From: Christoph Egger Date: Thu, 5 Mar 2015 13:37:52 +0000 (+0100) Subject: Add logger for InformationManager X-Git-Tag: v0.1~68 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=8995413dc4cdfaa8d617a8823050c32f921c6ada;p=frida%2Ffrida.git Add logger for InformationManager --- diff --git a/src/core/InformationManager.cxx b/src/core/InformationManager.cxx index 3eebc34..1ea4ba0 100644 --- a/src/core/InformationManager.cxx +++ b/src/core/InformationManager.cxx @@ -8,6 +8,10 @@ #include #include +InformationManager::InformationManager() + : logger(log4cxx::Logger::getLogger("InformationManager")) +{} + InformationManager::~InformationManager() { for (auto b : blocks) delete b.second; @@ -87,6 +91,7 @@ Comment* InformationManager::newLocalComment(uint64_t address, Function* f) { } void InformationManager::finishFunction(Function* fun) { + LOG4CXX_DEBUG(logger, "Finishing function " << fun->getName()); for (auto b : fun->blocks()) { BasicBlock* bl = b.second; blocks.insert(std::make_pair(bl->getStartAddress(), bl)); diff --git a/src/core/InformationManager.hxx b/src/core/InformationManager.hxx index f6eeb30..243ca94 100644 --- a/src/core/InformationManager.hxx +++ b/src/core/InformationManager.hxx @@ -1,6 +1,7 @@ #ifndef INCLUDE__InformationManager_hxx #define INCLUDE__InformationManager_hxx +#include #include #include #include @@ -90,6 +91,8 @@ private: std::unique_ptr disassembler; std::map functions; std::map blocks; + + log4cxx::LoggerPtr logger; }; #endif /* INCLUDE__InformationManager_hxx */