]> git.siccegge.de Git - frida/frida.git/commitdiff
Pass function instead of name
authorChristoph Egger <siccegge@cs.fau.de>
Tue, 27 May 2014 13:20:08 +0000 (15:20 +0200)
committerChristoph Egger <siccegge@cs.fau.de>
Tue, 27 May 2014 13:20:08 +0000 (15:20 +0200)
src/gui/Mainwindow.cxx
src/gui/Mainwindow.hxx

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);
 }
index 3892ebd61ad29572a9517f9a421a9f0c35f12d8b..9e9a6ca0ba65b3df776521d23cda7b3733164ade 100644 (file)
@@ -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;