X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.hxx;h=555070abefd624cf6e19a5b84218a58ab3b73097;hp=243ca94407766506eab1d0582d341f4f93a11423;hb=3d7b4d3a5f6c17823bb79490256661ddb5e7ab83;hpb=8995413dc4cdfaa8d617a8823050c32f921c6ada diff --git a/src/core/InformationManager.hxx b/src/core/InformationManager.hxx index 243ca94..555070a 100644 --- a/src/core/InformationManager.hxx +++ b/src/core/InformationManager.hxx @@ -13,20 +13,23 @@ class Function; class BasicBlock; class Comment; -class QString; - class RenameFunctionEvent; +class QString; +class QTemporaryFile; + 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,9 +53,17 @@ public: void dispatch(RenameFunctionEvent* event) { rename_function_signal(event); } + Function* getFunction(uint64_t address); - BasicBlock* getBasicBlock(uint64_t address); bool hasFunctions() const {return functions.size() != 0;} + std::map::const_iterator beginFunctions(); + std::map::const_iterator endFunctions(); + + BasicBlock* getBasicBlock(uint64_t address); + bool hasBasicBlocks() const {return blocks.size() != 0;} + std::map::const_iterator beginBasicBlocks(); + std::map::const_iterator endBasicBlocks(); + /* Protocoll: * @@ -83,6 +94,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; @@ -91,6 +103,8 @@ private: std::unique_ptr disassembler; std::map functions; std::map blocks; + std::string filename; + std::unique_ptr tmpfile; log4cxx::LoggerPtr logger; };