]> git.siccegge.de Git - frida/frida.git/commitdiff
Add logger for InformationManager
authorChristoph Egger <Christoph.Egger@fau.de>
Thu, 5 Mar 2015 13:37:52 +0000 (14:37 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Thu, 5 Mar 2015 13:37:52 +0000 (14:37 +0100)
src/core/InformationManager.cxx
src/core/InformationManager.hxx

index 3eebc3422300cfde2f68323192d7f20b2a46f203..1ea4ba0cb0357f7a12235d8af3adb17592659043 100644 (file)
@@ -8,6 +8,10 @@
 #include <quazip/quazip.h>
 #include <quazip/quazipfile.h>
 
+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));
index f6eeb30f4cede67fbe4b28989993ea0815305133..243ca94407766506eab1d0582d341f4f93a11423 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef INCLUDE__InformationManager_hxx
 #define INCLUDE__InformationManager_hxx
 
+#include <log4cxx/logger.h>
 #include <boost/signals2.hpp>
 #include <functional>
 #include <string>
@@ -90,6 +91,8 @@ private:
        std::unique_ptr<Disassembler> disassembler;
        std::map<uint64_t, Function*> functions;
        std::map<uint64_t, BasicBlock*> blocks;
+
+       log4cxx::LoggerPtr logger;
 };
 
 #endif /* INCLUDE__InformationManager_hxx */