]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/Mainwindow.cxx
Pass function instead of name
[frida/frida.git] / src / gui / Mainwindow.cxx
index f91957b4235a5eab6964cc3a8e2e25c0944cb12a..fb713fc57d3b4ca55c8ef9ab4dc286abfe3035a9 100644 (file)
@@ -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);
 }