GUI: "Follow in Disassembler" in dump context menu (useful for things)
This commit is contained in:
parent
6d1b0d40a7
commit
9fd88d90df
|
@ -132,7 +132,6 @@ void CPUDisassembly::setupFollowReferenceMenu(int_t wVA, QMenu* menu, bool isRef
|
|||
}
|
||||
if(DbgMemIsValidReadPtr(arg.memvalue))
|
||||
addFollowReferenceMenuItem("&Value: [" + QString(arg.mnemonic) + "]", arg.memvalue, menu, isReferences);
|
||||
|
||||
}
|
||||
else //arg_normal
|
||||
{
|
||||
|
|
|
@ -138,6 +138,10 @@ void CPUDump::setupContextMenu()
|
|||
mFollowStack = new QAction("Follow in Stack", this);
|
||||
connect(mFollowStack, SIGNAL(triggered()), this, SLOT(followStackSlot()));
|
||||
|
||||
// Follow in Disasm
|
||||
mFollowInDisasm = new QAction("Follow in Disassembler", this);
|
||||
connect(mFollowInDisasm, SIGNAL(triggered()), this, SLOT(followInDisasmSlot()));
|
||||
|
||||
//Label
|
||||
mSetLabelAction = new QAction("Set Label", this);
|
||||
mSetLabelAction->setShortcutContext(Qt::WidgetShortcut);
|
||||
|
@ -253,6 +257,7 @@ void CPUDump::setupContextMenu()
|
|||
|
||||
//Goto menu
|
||||
mGotoMenu = new QMenu("&Goto", this);
|
||||
|
||||
//Goto->Expression
|
||||
mGotoExpression = new QAction("&Expression", this);
|
||||
mGotoExpression->setShortcutContext(Qt::WidgetShortcut);
|
||||
|
@ -475,6 +480,7 @@ void CPUDump::contextMenuEvent(QContextMenuEvent* event)
|
|||
wMenu->addAction(mUndoSelection);
|
||||
if(DbgMemIsValidReadPtr(start) && DbgMemFindBaseAddr(start, 0) == DbgMemFindBaseAddr(DbgValFromString("csp"), 0))
|
||||
wMenu->addAction(mFollowStack);
|
||||
wMenu->addAction(mFollowInDisasm);
|
||||
wMenu->addAction(mSetLabelAction);
|
||||
wMenu->addMenu(mBreakpointMenu);
|
||||
wMenu->addAction(mFindPatternAction);
|
||||
|
@ -1331,6 +1337,12 @@ void CPUDump::followStackSlot()
|
|||
DbgCmdExec(QString("sdump " + addrText).toUtf8().constData());
|
||||
}
|
||||
|
||||
void CPUDump::followInDisasmSlot()
|
||||
{
|
||||
QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper();
|
||||
DbgCmdExec(QString("disasm " + addrText).toUtf8().constData());
|
||||
}
|
||||
|
||||
void CPUDump::selectionUpdatedSlot()
|
||||
{
|
||||
QString selStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper();
|
||||
|
|
|
@ -77,6 +77,7 @@ public slots:
|
|||
void undoSelectionSlot();
|
||||
void followStackSlot();
|
||||
void findReferencesSlot();
|
||||
void followInDisasmSlot();
|
||||
|
||||
void selectionUpdatedSlot();
|
||||
void yaraSlot();
|
||||
|
@ -118,6 +119,8 @@ private:
|
|||
QAction* mGotoExpression;
|
||||
QAction* mGotoFileOffset;
|
||||
|
||||
QAction* mFollowInDisasm;
|
||||
|
||||
QMenu* mHexMenu;
|
||||
QAction* mHexAsciiAction;
|
||||
QAction* mHexUnicodeAction;
|
||||
|
|
Loading…
Reference in New Issue