]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/InformationManager.cxx
Complete accessors for InformationManager managed objects
[frida/frida.git] / src / core / InformationManager.cxx
index 711d47a552cb466b78b5c69a49d86e0d89ec9741..61daa3d269d094dc130ae80e82d51f3ac9871a89 100644 (file)
@@ -112,6 +112,12 @@ void InformationManager::save(const std::string& filename) {
 void InformationManager::signal_new_function(Function* fun) {
 }
 
 void InformationManager::signal_new_function(Function* fun) {
 }
 
+
+
+/* *******************************
+ * Accessors for the Functions map
+ */
+
 Function* InformationManager::getFunction(uint64_t address) {
        auto it = functions.find(address);
        if (it != functions.end())
 Function* InformationManager::getFunction(uint64_t address) {
        auto it = functions.find(address);
        if (it != functions.end())
@@ -120,6 +126,18 @@ Function* InformationManager::getFunction(uint64_t address) {
                return NULL;
 }
 
                return NULL;
 }
 
+std::map<uint64_t, Function*>::const_iterator InformationManager::beginFunctions() {
+       return functions.begin();
+}
+std::map<uint64_t, Function*>::const_iterator InformationManager::endFunctions() {
+       return functions.end();
+}
+
+
+/* *********************************
+ * Accessors for the BasicBlocks map
+ */
+
 BasicBlock* InformationManager::getBasicBlock(uint64_t address) {
        auto it = blocks.find(address);
        if (it != blocks.end())
 BasicBlock* InformationManager::getBasicBlock(uint64_t address) {
        auto it = blocks.find(address);
        if (it != blocks.end())
@@ -128,6 +146,19 @@ BasicBlock* InformationManager::getBasicBlock(uint64_t address) {
                return NULL;
 }
 
                return NULL;
 }
 
+std::map<uint64_t, BasicBlock*>::const_iterator InformationManager::beginBasicBlocks() {
+       return blocks.begin();
+}
+std::map<uint64_t, BasicBlock*>::const_iterator InformationManager::endBasicBlocks() {
+       return blocks.end();
+}
+
+
+
+/* ********************************
+ * Factory methods for data classes
+ */
+
 Function* InformationManager::newFunction(uint64_t address) {
        Function* fun = new Function(address, this);
        functions.insert(std::make_pair(address, fun));
 Function* InformationManager::newFunction(uint64_t address) {
        Function* fun = new Function(address, this);
        functions.insert(std::make_pair(address, fun));