From ad0c8e3809d00c7fb458c6c0803e572c171a8c8f Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Tue, 27 May 2014 15:20:08 +0200 Subject: [PATCH] Pass function instead of name --- src/gui/Mainwindow.cxx | 6 +++--- src/gui/Mainwindow.hxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.5