]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/Function.hxx
Reoganize Function/BasicBlock creation
[frida/frida.git] / src / core / Function.hxx
index 39d3f51b47cc39aab43c453f0cf3edc4b598b55f..5497800969e57b8f12a2a2c8e24bdaf20688c675 100644 (file)
@@ -8,11 +8,6 @@ class InformationManager;
 
 class Function {
 public:
-       Function(const std::string& name, uint64_t start_address,
-                InformationManager* manager)
-               : name(name)
-               , start_address(start_address)
-               ,manager(manager) {}
 
        uint64_t getStartAddress() const {
                return start_address;
@@ -20,8 +15,7 @@ public:
 
        std::string getName() const
                { return name; }
-       void setName(const std::string& new_name)
-               { name = new_name; }
+       void setName(const std::string& new_name);
 
        InformationManager* getManager() const {
                return manager;
@@ -31,14 +25,18 @@ public:
                _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