X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FInformationManager.cxx;h=61daa3d269d094dc130ae80e82d51f3ac9871a89;hp=bee2a9eef9c9cbdd6e9ec66be681160f27fda9b5;hb=3d7b4d3a5f6c17823bb79490256661ddb5e7ab83;hpb=fc58083a9eee8534fe3f67ddd3c020c87cd42a5f diff --git a/src/core/InformationManager.cxx b/src/core/InformationManager.cxx index bee2a9e..61daa3d 100644 --- a/src/core/InformationManager.cxx +++ b/src/core/InformationManager.cxx @@ -13,7 +13,7 @@ InformationManager* current_information_manager; InformationManager::InformationManager() - : logger(log4cxx::Logger::getLogger("InformationManager")) + : logger(log4cxx::Logger::getLogger("core.InformationManager")) { current_information_manager = this; } @@ -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));