X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.cxx;h=61daa3d269d094dc130ae80e82d51f3ac9871a89;hp=711d47a552cb466b78b5c69a49d86e0d89ec9741;hb=3d7b4d3a5f6c17823bb79490256661ddb5e7ab83;hpb=e2e45989c79c060cf30b1b4c1a2c1e7d26022d23 diff --git a/src/core/InformationManager.cxx b/src/core/InformationManager.cxx index 711d47a..61daa3d 100644 --- a/src/core/InformationManager.cxx +++ b/src/core/InformationManager.cxx @@ -112,6 +112,12 @@ void InformationManager::save(const std::string& filename) { 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()) @@ -120,6 +126,18 @@ Function* InformationManager::getFunction(uint64_t address) { return NULL; } +std::map::const_iterator InformationManager::beginFunctions() { + return functions.begin(); +} +std::map::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()) @@ -128,6 +146,19 @@ BasicBlock* InformationManager::getBasicBlock(uint64_t address) { return NULL; } +std::map::const_iterator InformationManager::beginBasicBlocks() { + return blocks.begin(); +} +std::map::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));