X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.cxx;h=1234ac96aa64845775af2069a0bf73c901634d80;hp=7c1c5dee207a4e9e1023a812858fec5e8ea67a9b;hb=9fe5caf6408d1b7d5eb86dacdb211bd22335398a;hpb=32e87746db981882b95aceddde79ef12034a3405 diff --git a/src/core/InformationManager.cxx b/src/core/InformationManager.cxx index 7c1c5de..1234ac9 100644 --- a/src/core/InformationManager.cxx +++ b/src/core/InformationManager.cxx @@ -7,6 +7,14 @@ #include #include +InformationManager::~InformationManager() { + for (BasicBlock * b : blocks) + delete b; + + for (Function * f : functions) + delete f; +} + void InformationManager::reset(const std::string& filename) { disassembler.reset(createLLVMDisassembler(filename, this)); if (disassembler.get() != NULL) @@ -50,3 +58,10 @@ void InformationManager::save(const QString& filename) { zip.close(); } + +void InformationManager::signal_new_function(Function* fun) { + functions.insert(fun); + for (auto b : fun->blocks()) + blocks.insert(b.second); + new_function_signal(fun); +}