From 8995413dc4cdfaa8d617a8823050c32f921c6ada Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Thu, 5 Mar 2015 14:37:52 +0100 Subject: [PATCH] Add logger for InformationManager --- src/core/InformationManager.cxx | 5 +++++ src/core/InformationManager.hxx | 3 +++ 2 files changed, 8 insertions(+) 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 */ -- 2.39.2