From: Christoph Egger Date: Sat, 10 Jan 2015 16:45:14 +0000 (+0100) Subject: Logging improvements X-Git-Tag: v0.1~131 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;ds=inline;h=13965ac321c9b79d1b8a155989c38b1b9dcdb511;p=frida%2Ffrida.git Logging improvements --- diff --git a/src/disassembler/llvm/LLVMDisassembler.cxx b/src/disassembler/llvm/LLVMDisassembler.cxx index c44c60c..6a25e9a 100644 --- a/src/disassembler/llvm/LLVMDisassembler.cxx +++ b/src/disassembler/llvm/LLVMDisassembler.cxx @@ -209,6 +209,9 @@ void LLVMDisassembler::disassembleFunction(LLVMFunction* function) { blocks.insert(std::make_pair(block->getStartAddress(), block)); function->addBasicBlock(block); remaining_blocks.push(block); + } else { + LOG4CXX_DEBUG(logger, "Reusing Block starting at " << std::hex << current_block->getStartAddress()); + function->addBasicBlock(blocks.find(jmptarget)->second); } if (MIA->isConditionalBranch(inst)) { jmptarget = base_address + current_address + inst_size; @@ -218,6 +221,9 @@ void LLVMDisassembler::disassembleFunction(LLVMFunction* function) { blocks.insert(std::make_pair(block->getStartAddress(), block)); function->addBasicBlock(block); remaining_blocks.push(block); + } else { + LOG4CXX_DEBUG(logger, "Reusing Block starting at " << std::hex << current_block->getStartAddress()); + function->addBasicBlock(blocks.find(jmptarget)->second); } } }