From: Christoph Egger Date: Tue, 27 May 2014 13:20:08 +0000 (+0200) Subject: Pass function instead of name X-Git-Tag: v0.1~193 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=ad0c8e3809d00c7fb458c6c0803e572c171a8c8f;p=frida%2Ffrida.git Pass function instead of name --- diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index f91957b..fb713fc 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -63,7 +63,7 @@ void Mainwindow::openBinary(const std::string& filename) { if (filename != "") { disassembler.reset(new LLVMDisassembler(filename)); disassembler->forEachFunction([&](uint64_t address, Function* fun) { - populateSymbolInformation(fun->getName()); + populateSymbolInformation(fun); }); // curBin = new Binary(fileName.toStdString()); @@ -77,7 +77,7 @@ void Mainwindow::openBinary(const std::string& filename) { } } -void Mainwindow::populateSymbolInformation(const std::string& sym) { +void Mainwindow::populateSymbolInformation(Function* fun) { QTabWidget * w = new QTabWidget(); // Listing @@ -124,6 +124,6 @@ void Mainwindow::populateSymbolInformation(const std::string& sym) { QGraphicsView * view = new QGraphicsView(scene); w->addTab(view, "CFG"); - listWidget->addItem(sym.c_str()); + listWidget->addItem(fun->getName().c_str()); stackedWidget->addWidget(w); } diff --git a/src/gui/Mainwindow.hxx b/src/gui/Mainwindow.hxx index 3892ebd..9e9a6ca 100644 --- a/src/gui/Mainwindow.hxx +++ b/src/gui/Mainwindow.hxx @@ -14,7 +14,7 @@ public: private: void openBinary(const std::string& filename); - void populateSymbolInformation(const std::string& sym); + void populateSymbolInformation(Function * fun); QTextEdit *textEdit; QPushButton *quitButton;