X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.hxx;h=86e4d8cd80039fbe0b4c3fc43205a4b5d41585f0;hp=03cb3b866ec139b875ffad8a7556820b3733c2e1;hb=55eb2a804c19c35a9006a2241a0feefe219bf21e;hpb=0daf9a157f3d41690cf4a0287db1adecc4ad0b71 diff --git a/src/core/InformationManager.hxx b/src/core/InformationManager.hxx index 03cb3b8..86e4d8c 100644 --- a/src/core/InformationManager.hxx +++ b/src/core/InformationManager.hxx @@ -1,30 +1,35 @@ #ifndef INCLUDE__InformationManager_hxx #define INCLUDE__InformationManager_hxx +#include #include #include #include #include -class Disassembler; +#include "disassembler/Disassembler.hxx" + class Function; class BasicBlock; class Comment; class QString; +class QTemporaryFile; class RenameFunctionEvent; class InformationManager { public: + InformationManager(); ~InformationManager(); void reset(const std::string& filename); - void save(const QString& filename); + void load(const std::string& filename); + void save(const std::string& filename); void signal_new_function(Function* f); void signal_new_dyn_symbol(const std::string& f) - { new_dyn_symbol_signal(f); } + { new_dyn_symbol_signal(f); } boost::signals2::connection connect_new_function_signal(std::function f) @@ -50,6 +55,7 @@ public: Function* getFunction(uint64_t address); BasicBlock* getBasicBlock(uint64_t address); + bool hasFunctions() const {return functions.size() != 0;} /* Protocoll: * @@ -80,6 +86,7 @@ public: void deleteFunction(Function* f); void deleteBasicBlock(BasicBlock* b); void deleteComment(Comment* c); + private: boost::signals2::signal reset_signal; boost::signals2::signal new_function_signal; @@ -88,6 +95,10 @@ private: std::unique_ptr disassembler; std::map functions; std::map blocks; + std::string filename; + std::unique_ptr tmpfile; + + log4cxx::LoggerPtr logger; }; #endif /* INCLUDE__InformationManager_hxx */