]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/Function.hxx
Reoganize Function/BasicBlock creation
[frida/frida.git] / src / core / Function.hxx
index f4fa90e1e429eeaf9928896b454906226ce3e223..5497800969e57b8f12a2a2c8e24bdaf20688c675 100644 (file)
@@ -8,19 +8,14 @@ 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;
        }
 
-       std::string getName() const {
-               return name;
-       }
+       std::string getName() const
+               { return name; }
+       void setName(const std::string& new_name);
 
        InformationManager* getManager() const {
                return manager;
@@ -30,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