Revert "debugger: Open memory editor at pointee address, not at pointer address"

This reverts commit 07b118197a.

Does not work when display format was changed.
This commit is contained in:
Robert Loehning
2010-05-19 16:11:47 +02:00
parent 07b118197a
commit a25280fca0
2 changed files with 3 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ enum WatchRoles
TypeFormatListRole, TypeFormatListRole,
TypeFormatRole, // Used to communicate alternative formats to the view. TypeFormatRole, // Used to communicate alternative formats to the view.
IndividualFormatRole, IndividualFormatRole,
AddressRole, // Address of the object. AddressRole, // Some memory address related to the object.
}; };
enum IntegerFormat enum IntegerFormat

View File

@@ -37,7 +37,6 @@
#include "debuggerdialogs.h" #include "debuggerdialogs.h"
#include "debuggermanager.h" #include "debuggermanager.h"
#include "idebuggerengine.h" #include "idebuggerengine.h"
#include "watchutils.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/savedaction.h> #include <utils/savedaction.h>
@@ -300,12 +299,9 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
const bool canShowMemory = engineCapabilities & ShowMemoryCapability; const bool canShowMemory = engineCapabilities & ShowMemoryCapability;
actWatchUnknownMemory->setEnabled(actionsEnabled && canShowMemory); actWatchUnknownMemory->setEnabled(actionsEnabled && canShowMemory);
QString editAddress = address; if (canShowMemory && !address.isEmpty())
if (isPointerType(type))
editAddress = model()->data(mi1).toString();
if (canShowMemory && !editAddress.isEmpty())
actWatchKnownMemory = actWatchKnownMemory =
new QAction(tr("Open Memory Editor at %1").arg(editAddress), &menu); new QAction(tr("Open Memory Editor at %1").arg(address), &menu);
menu.addSeparator(); menu.addSeparator();
QAction *actSetWatchpoint = 0; QAction *actSetWatchpoint = 0;