diff --git a/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp b/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp index 33c2d28f..e4678730 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp +++ b/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp @@ -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 { diff --git a/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp b/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp index 72eaf1ff..18963745 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp +++ b/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp @@ -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(); diff --git a/x64_dbg_gui/Project/Src/Gui/CPUDump.h b/x64_dbg_gui/Project/Src/Gui/CPUDump.h index 3dc2654d..70e52908 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDump.h +++ b/x64_dbg_gui/Project/Src/Gui/CPUDump.h @@ -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;