From 0aa4fc2a1f3d5a9e6e7c48f4681c1231e9c7697b Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Mon, 12 Oct 2015 08:52:05 +0200 Subject: [PATCH] Add comments --- src/core/Function.hxx | 3 +++ src/core/InformationManager.hxx | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/core/Function.hxx b/src/core/Function.hxx index 98417de..3a328f6 100644 --- a/src/core/Function.hxx +++ b/src/core/Function.hxx @@ -17,6 +17,9 @@ public: InformationManager* getManager() const { return manager; } + /* Dynamic functions are the ones which are imported from shared + * libraries and not structly part of the binary at hand + */ bool isDynamic() const { return dynamic; } void addBasicBlock(BasicBlock* block) { diff --git a/src/core/InformationManager.hxx b/src/core/InformationManager.hxx index 30444ac..7d38007 100644 --- a/src/core/InformationManager.hxx +++ b/src/core/InformationManager.hxx @@ -42,16 +42,25 @@ 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;} + + Function* getFunction(uint64_t address); std::map::const_iterator beginFunctions(); std::map::const_iterator endFunctions(); -- 2.39.2