Fix graph double click

This commit is contained in:
xarkes 2017-10-12 14:35:30 +02:00
parent 822d088f52
commit 7b3d5ea7a7
2 changed files with 7 additions and 20 deletions

View File

@ -745,10 +745,6 @@ void CutterCore::getOpcodes()
this->regs.removeLast(); this->regs.removeLast();
} }
void CutterCore::setSettings() void CutterCore::setSettings()
{ {
setConfig("scr.color", false); setConfig("scr.color", false);
@ -807,8 +803,6 @@ void CutterCore::setSettings()
cmd("ec graph.trufae rgb:4183D7"); cmd("ec graph.trufae rgb:4183D7");
} }
QList<RVA> CutterCore::getSeekHistory() QList<RVA> CutterCore::getSeekHistory()
{ {
CORE_LOCK(); CORE_LOCK();
@ -836,7 +830,6 @@ QStringList CutterCore::getAsmPluginNames()
return ret; return ret;
} }
QStringList CutterCore::getAnalPluginNames() QStringList CutterCore::getAnalPluginNames()
{ {
CORE_LOCK(); CORE_LOCK();
@ -852,8 +845,6 @@ QStringList CutterCore::getAnalPluginNames()
return ret; return ret;
} }
QStringList CutterCore::getProjectNames() QStringList CutterCore::getProjectNames()
{ {
CORE_LOCK(); CORE_LOCK();
@ -866,7 +857,6 @@ QStringList CutterCore::getProjectNames()
return ret; return ret;
} }
QList<RBinPluginDescription> CutterCore::getRBinPluginDescriptions(const QString &type) QList<RBinPluginDescription> CutterCore::getRBinPluginDescriptions(const QString &type)
{ {
QList<RBinPluginDescription> ret; QList<RBinPluginDescription> ret;
@ -894,7 +884,6 @@ QList<RBinPluginDescription> CutterCore::getRBinPluginDescriptions(const QString
return ret; return ret;
} }
QList<FunctionDescription> CutterCore::getAllFunctions() QList<FunctionDescription> CutterCore::getAllFunctions()
{ {
CORE_LOCK(); CORE_LOCK();
@ -918,8 +907,6 @@ QList<FunctionDescription> CutterCore::getAllFunctions()
return ret; return ret;
} }
QList<ImportDescription> CutterCore::getAllImports() QList<ImportDescription> CutterCore::getAllImports()
{ {
CORE_LOCK(); CORE_LOCK();
@ -945,7 +932,6 @@ QList<ImportDescription> CutterCore::getAllImports()
return ret; return ret;
} }
QList<ExportDescription> CutterCore::getAllExports() QList<ExportDescription> CutterCore::getAllExports()
{ {
CORE_LOCK(); CORE_LOCK();
@ -972,7 +958,6 @@ QList<ExportDescription> CutterCore::getAllExports()
return ret; return ret;
} }
QList<SymbolDescription> CutterCore::getAllSymbols() QList<SymbolDescription> CutterCore::getAllSymbols()
{ {
CORE_LOCK(); CORE_LOCK();
@ -1063,7 +1048,6 @@ QList<RelocDescription> CutterCore::getAllRelocs()
return ret; return ret;
} }
QList<StringDescription> CutterCore::getAllStrings() QList<StringDescription> CutterCore::getAllStrings()
{ {
CORE_LOCK(); CORE_LOCK();
@ -1085,7 +1069,6 @@ QList<StringDescription> CutterCore::getAllStrings()
return ret; return ret;
} }
QList<FlagspaceDescription> CutterCore::getAllFlagspaces() QList<FlagspaceDescription> CutterCore::getAllFlagspaces()
{ {
CORE_LOCK(); CORE_LOCK();
@ -1104,7 +1087,6 @@ QList<FlagspaceDescription> CutterCore::getAllFlagspaces()
return ret; return ret;
} }
QList<FlagDescription> CutterCore::getAllFlags(QString flagspace) QList<FlagDescription> CutterCore::getAllFlags(QString flagspace)
{ {
CORE_LOCK(); CORE_LOCK();
@ -1130,7 +1112,6 @@ QList<FlagDescription> CutterCore::getAllFlags(QString flagspace)
return ret; return ret;
} }
QList<SectionDescription> CutterCore::getAllSections() QList<SectionDescription> CutterCore::getAllSections()
{ {
CORE_LOCK(); CORE_LOCK();

View File

@ -734,7 +734,13 @@ void DisassemblerGraphView::mouseDoubleClickEvent(QMouseEvent* event)
{ {
duint instr = this->getInstrForMouseEvent(event); duint instr = this->getInstrForMouseEvent(event);
//DbgCmdExec(QString("graph dis.branchdest(%1), silent").arg(ToPtrString(instr)).toUtf8().constData()); //DbgCmdExec(QString("graph dis.branchdest(%1), silent").arg(ToPtrString(instr)).toUtf8().constData());
CutterCore::getInstance()->seek(instr); QList<XrefDescription> 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.";
}
} }
} }