]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/InformationManager.hxx
Add doc repo as submodule
[frida/frida.git] / src / core / InformationManager.hxx
index 2f70d7365d7a27353ffc6ce843f47f99fae832f4..ddba5a3f8e4080f49b4f8cedbd6a51cd47c9a1f5 100644 (file)
@@ -11,6 +11,8 @@
 #include "qt.hxx"
 #include "disassembler/Disassembler.hxx"
 
+#include "core/events/NewFunctionEvent.hxx"
+
 class Interpreter;
 
 class Function;
@@ -33,28 +35,38 @@ signals:
 public:
 #endif
        void renameFunctionEvent(RenameFunctionEvent* event);
-       void newFunctionEvent(NewFunctionEvent* event);
+       void newFunctionEvent(NewFunctionEvent event);
        void changeCommentEvent(ChangeCommentEvent* event);
-       void reset();
+       void resetEvent();
 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<uint64_t, Function*>::const_iterator beginFunctions();
        std::map<uint64_t, Function*>::const_iterator endFunctions();
 
        BasicBlock* getBasicBlock(uint64_t address);
-       bool hasBasicBlocks() const {return blocks.size() != 0;}
        std::map<uint64_t, BasicBlock*>::const_iterator beginBasicBlocks();
        std::map<uint64_t, BasicBlock*>::const_iterator endBasicBlocks();
 
@@ -62,7 +74,6 @@ public:
                std::multimap<uint64_t, Comment*>::const_iterator,
                std::multimap<uint64_t, Comment*>::const_iterator>
        getComments(uint64_t address);
-       bool hasComments() const {return ! comments.empty();}
        std::multimap<uint64_t,Comment*>::const_iterator beginComments();
        std::multimap<uint64_t,Comment*>::const_iterator endComments();
 
@@ -114,6 +125,7 @@ private:
        std::unique_ptr<QTemporaryFile> tmpfile;
        std::vector<QPluginLoader*> plugins;
 
+       QThread disassemblerThread;
        log4cxx::LoggerPtr logger;
 };