forked from qt-creator/qt-creator
debugger: Open memory editor at pointee address, not at pointer address
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "debuggerdialogs.h"
|
||||
#include "debuggermanager.h"
|
||||
#include "idebuggerengine.h"
|
||||
#include "watchutils.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/savedaction.h>
|
||||
@@ -299,9 +300,12 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
const bool canShowMemory = engineCapabilities & ShowMemoryCapability;
|
||||
actWatchUnknownMemory->setEnabled(actionsEnabled && canShowMemory);
|
||||
|
||||
if (canShowMemory && !address.isEmpty())
|
||||
QString editAddress = address;
|
||||
if (isPointerType(type))
|
||||
editAddress = model()->data(mi1).toString();
|
||||
if (canShowMemory && !editAddress.isEmpty())
|
||||
actWatchKnownMemory =
|
||||
new QAction(tr("Open Memory Editor at %1").arg(address), &menu);
|
||||
new QAction(tr("Open Memory Editor at %1").arg(editAddress), &menu);
|
||||
menu.addSeparator();
|
||||
|
||||
QAction *actSetWatchpoint = 0;
|
||||
|
||||
Reference in New Issue
Block a user