]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/Function.hxx
Reoganize Function/BasicBlock creation
[frida/frida.git] / src / core / Function.hxx
index 3c8f799543c8d3acb5901951a64cf9bb96246e74..5497800969e57b8f12a2a2c8e24bdaf20688c675 100644 (file)
@@ -4,32 +4,39 @@
 #include <map>
 #include "BasicBlock.hxx"
 
+class InformationManager;
+
 class Function {
 public:
-       Function(const std::string& name, uint64_t start_address)
-               : name(name)
-               , start_address(start_address) {
-       }
 
        uint64_t getStartAddress() const {
                return start_address;
        }
 
-       std::string getName() const {
-               return name;
+       std::string getName() const
+               { return name; }
+       void setName(const std::string& new_name);
+
+       InformationManager* getManager() const {
+               return manager;
        }
 
        void addBasicBlock(BasicBlock* block) {
                _blocks.insert(std::make_pair(block->getStartAddress(), block));
        }
 
-       std::map<uint64_t, BasicBlock*>& blocks() {
+       const std::map<uint64_t, BasicBlock*>& blocks() {
                return _blocks;
        }
 private:
+       Function(uint64_t start_address, InformationManager* manager);
+
        std::string name;
        uint64_t start_address;
+       InformationManager * manager;
        std::map<uint64_t, BasicBlock*> _blocks;
+
+       friend class InformationManager;
 };
 
 #endif