X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.hxx;h=ddba5a3f8e4080f49b4f8cedbd6a51cd47c9a1f5;hp=a866e0adf62c39791d8a8effe7453794f989cb60;hb=45f6c89c061ae3e819cd136807c04f997696194e;hpb=f9d8bd4a0312a92a1ec3493e83996c0a99d8d1bf diff --git a/src/core/InformationManager.hxx b/src/core/InformationManager.hxx index a866e0a..ddba5a3 100644 --- a/src/core/InformationManager.hxx +++ b/src/core/InformationManager.hxx @@ -42,21 +42,31 @@ public: InformationManager(); ~InformationManager(); + // Start working on a fresh binary void reset(const std::string& filename); + + // Load a saved binary void load(const std::string& filename); + + // Save current state to disk void save(const std::string& filename); Disassembler* getDisassembler() { return disassembler.get(); } // Accessors - Function* getFunction(uint64_t address); + /* Used by the disassembler to determine whether to use unsafe + * heuristics for finding an entry point + */ bool hasFunctions() const {return functions.size() != 0;} + + uint64_t getEntryAddress() {return disassembler->entryAddress();} + + Function* getFunction(uint64_t address); 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(); @@ -64,7 +74,6 @@ public: std::multimap::const_iterator, std::multimap::const_iterator> getComments(uint64_t address); - bool hasComments() const {return ! comments.empty();} std::multimap::const_iterator beginComments(); std::multimap::const_iterator endComments(); @@ -116,6 +125,7 @@ private: std::unique_ptr tmpfile; std::vector plugins; + QThread disassemblerThread; log4cxx::LoggerPtr logger; };