X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2FMainwindow.cxx;fp=src%2Fgui%2FMainwindow.cxx;h=850c0364b61ba1c4d5fc845586ba8913fe48f9d9;hp=adadc0686a9a600d70f99b2e85dc9aae523a2499;hb=4979a0a839390713671f3f9756dc6820501d4ad4;hpb=82b40a653fb3a1d349e32679340f276d5c61d269 diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index adadc06..850c036 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -90,6 +90,11 @@ Mainwindow::Mainwindow(InformationManager* mgr) QTreeWidgetItem * external = new QTreeWidgetItem(listWidget, QStringList("External Functions")); external->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); external->setBackground(0, QBrush(QColor(0xff, 0xdd, 0xdd))); + connect(mgr, &InformationManager::resetEvent, + [this,mgr]() { + connect(this, SIGNAL(requestNewFunctionByAddress(uint64_t)), + mgr->getDisassembler(), SLOT(disassembleFunctionAt(uint64_t))); + }); connect(mgr, &InformationManager::newFunctionEvent, [=] (NewFunctionEvent* event) { std::string name = event->function->getName(); @@ -220,7 +225,7 @@ void Mainwindow::requestNewFunction() { NewFunctionDialog dialog; int result = dialog.exec(); if (QDialog::Accepted == result) { - requestNewFunctionByAddress(dialog.result()); + emit requestNewFunctionByAddress(dialog.result()); } else { LOG4CXX_DEBUG(logger, "requestNewFunction aborted"); } @@ -238,12 +243,6 @@ void Mainwindow::requestNewGroup() { } } -void Mainwindow::requestNewFunctionByAddress(uint64_t address) { - LOG4CXX_DEBUG(logger, "requesting Function at " << std::hex << address); - manager->getDisassembler()->disassembleFunctionAt(address); - switchMainPlaneToAddress(address); -} - void Mainwindow::renameFunction(Function* function) { SimpleStringDialog dialog("New name"); int result = dialog.exec();