X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.hxx;h=610ece50da253f51820e9af3679ed934008808cb;hp=03cb3b866ec139b875ffad8a7556820b3733c2e1;hb=9b99fc5856d5fe88bb1d2aad4d2ee7cd86b5be57;hpb=0daf9a157f3d41690cf4a0287db1adecc4ad0b71 diff --git a/src/core/InformationManager.hxx b/src/core/InformationManager.hxx index 03cb3b8..610ece5 100644 --- a/src/core/InformationManager.hxx +++ b/src/core/InformationManager.hxx @@ -1,30 +1,39 @@ #ifndef INCLUDE__InformationManager_hxx #define INCLUDE__InformationManager_hxx +#include #include #include #include #include +#include + +#include "disassembler/Disassembler.hxx" + +class Interpreter; -class Disassembler; class Function; class BasicBlock; class Comment; -class QString; - class RenameFunctionEvent; +class QString; +class QTemporaryFile; +class QPluginLoader; + 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) @@ -48,8 +57,23 @@ public: void dispatch(RenameFunctionEvent* event) { rename_function_signal(event); } + Function* getFunction(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(); + + + Interpreter* getInterpreter(const std::string& name); + bool hasInterpreters() const {return interpreters.size() != 0;} + std::map::const_iterator beginInterpreters(); + std::map::const_iterator endInterpreters(); + /* Protocoll: * @@ -80,14 +104,21 @@ 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; boost::signals2::signal new_dyn_symbol_signal; boost::signals2::signal rename_function_signal; std::unique_ptr disassembler; + std::map interpreters; std::map functions; std::map blocks; + std::string filename; + std::unique_ptr tmpfile; + std::vector plugins; + + log4cxx::LoggerPtr logger; }; #endif /* INCLUDE__InformationManager_hxx */