diff --git a/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp b/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp index 6430be97..d88feb87 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp +++ b/x64_dbg_gui/Project/Src/Gui/CPUDump.cpp @@ -150,6 +150,14 @@ void CPUDump::setupContextMenu() #endif //_WIN64 connect(mFollowData, SIGNAL(triggered()), this, SLOT(followDataSlot())); + //Follow DWORD/QWORD in Disasm +#ifdef _WIN64 + mFollowDataDump = new QAction("&Follow QWORD in Dump", this); +#else //x86 + mFollowDataDump = new QAction("&Follow DWORD in Dump", this); +#endif //_WIN64 + connect(mFollowDataDump, SIGNAL(triggered()), this, SLOT(followDataDumpSlot())); + //Label mSetLabelAction = new QAction("Set Label", this); mSetLabelAction->setShortcutContext(Qt::WidgetShortcut); @@ -516,7 +524,10 @@ void CPUDump::contextMenuEvent(QContextMenuEvent* event) uint_t ptr = 0; DbgMemRead(selectedAddr, (unsigned char*)&ptr, sizeof(uint_t)); if(DbgMemIsValidReadPtr(ptr)) + { wMenu->addAction(mFollowData); + wMenu->addAction(mFollowDataDump); + } wMenu->addAction(mSetLabelAction); wMenu->addMenu(mBreakpointMenu); @@ -1398,6 +1409,12 @@ void CPUDump::followDataSlot() DbgCmdExec(QString("disasm [%1]").arg(addrText).toUtf8().constData()); } +void CPUDump::followDataDumpSlot() +{ + QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); + DbgCmdExec(QString("dump [%1]").arg(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 4cf8ea9d..be1210af 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDump.h +++ b/x64_dbg_gui/Project/Src/Gui/CPUDump.h @@ -81,6 +81,7 @@ public slots: void findReferencesSlot(); void followInDisasmSlot(); void followDataSlot(); + void followDataDumpSlot(); void selectionUpdatedSlot(); void yaraSlot(); @@ -173,6 +174,7 @@ private: QAction* mDataCopyAction; QAction* mUndoSelection; QAction* mFollowData; + QAction* mFollowDataDump; QMenu* mSpecialMenu; QMenu* mCustomMenu;