diff --git a/src/cutter.cpp b/src/cutter.cpp index eeccf12e..ef625b8f 100644 --- a/src/cutter.cpp +++ b/src/cutter.cpp @@ -745,10 +745,6 @@ void CutterCore::getOpcodes() this->regs.removeLast(); } - - - - void CutterCore::setSettings() { setConfig("scr.color", false); @@ -807,8 +803,6 @@ void CutterCore::setSettings() cmd("ec graph.trufae rgb:4183D7"); } - - QList CutterCore::getSeekHistory() { CORE_LOCK(); @@ -836,7 +830,6 @@ QStringList CutterCore::getAsmPluginNames() return ret; } - QStringList CutterCore::getAnalPluginNames() { CORE_LOCK(); @@ -852,8 +845,6 @@ QStringList CutterCore::getAnalPluginNames() return ret; } - - QStringList CutterCore::getProjectNames() { CORE_LOCK(); @@ -866,7 +857,6 @@ QStringList CutterCore::getProjectNames() return ret; } - QList CutterCore::getRBinPluginDescriptions(const QString &type) { QList ret; @@ -894,7 +884,6 @@ QList CutterCore::getRBinPluginDescriptions(const QString return ret; } - QList CutterCore::getAllFunctions() { CORE_LOCK(); @@ -918,8 +907,6 @@ QList CutterCore::getAllFunctions() return ret; } - - QList CutterCore::getAllImports() { CORE_LOCK(); @@ -945,7 +932,6 @@ QList CutterCore::getAllImports() return ret; } - QList CutterCore::getAllExports() { CORE_LOCK(); @@ -972,7 +958,6 @@ QList CutterCore::getAllExports() return ret; } - QList CutterCore::getAllSymbols() { CORE_LOCK(); @@ -1063,7 +1048,6 @@ QList CutterCore::getAllRelocs() return ret; } - QList CutterCore::getAllStrings() { CORE_LOCK(); @@ -1085,7 +1069,6 @@ QList CutterCore::getAllStrings() return ret; } - QList CutterCore::getAllFlagspaces() { CORE_LOCK(); @@ -1104,7 +1087,6 @@ QList CutterCore::getAllFlagspaces() return ret; } - QList CutterCore::getAllFlags(QString flagspace) { CORE_LOCK(); @@ -1130,7 +1112,6 @@ QList CutterCore::getAllFlags(QString flagspace) return ret; } - QList CutterCore::getAllSections() { CORE_LOCK(); diff --git a/src/widgets/DisassemblerGraphView.cpp b/src/widgets/DisassemblerGraphView.cpp index c9a134f2..c043c8de 100644 --- a/src/widgets/DisassemblerGraphView.cpp +++ b/src/widgets/DisassemblerGraphView.cpp @@ -734,7 +734,13 @@ void DisassemblerGraphView::mouseDoubleClickEvent(QMouseEvent* event) { duint instr = this->getInstrForMouseEvent(event); //DbgCmdExec(QString("graph dis.branchdest(%1), silent").arg(ToPtrString(instr)).toUtf8().constData()); - CutterCore::getInstance()->seek(instr); + QList refs = CutterCore::getInstance()->getXRefs(instr, false, false); + if (refs.length()) { + CutterCore::getInstance()->seek(refs.at(0).to); + } + if (refs.length() > 1) { + qWarning() << "Too many references here. Weird behaviour expected."; + } } }