LLVMBasicBlock * block = new LLVMBasicBlock(function->getStartAddress(), this);
remaining_blocks.push(block);
blocks.insert(std::make_pair(block->getStartAddress(), block));
LLVMBasicBlock * block = new LLVMBasicBlock(function->getStartAddress(), this);
remaining_blocks.push(block);
blocks.insert(std::make_pair(block->getStartAddress(), block));
if (blocks.find(jmptarget) == blocks.end()) {
LLVMBasicBlock * block = new LLVMBasicBlock(jmptarget, this);
blocks.insert(std::make_pair(block->getStartAddress(), block));
if (blocks.find(jmptarget) == blocks.end()) {
LLVMBasicBlock * block = new LLVMBasicBlock(jmptarget, this);
blocks.insert(std::make_pair(block->getStartAddress(), block));
if (blocks.find(jmptarget) == blocks.end()) {
LLVMBasicBlock * block = new LLVMBasicBlock(jmptarget, this);
blocks.insert(std::make_pair(block->getStartAddress(), block));
if (blocks.find(jmptarget) == blocks.end()) {
LLVMBasicBlock * block = new LLVMBasicBlock(jmptarget, this);
blocks.insert(std::make_pair(block->getStartAddress(), block));
LOG4CXX_DEBUG(logger, "Finished function " << function->getName());
manager->signal_new_function(function);
}
LOG4CXX_DEBUG(logger, "Finished function " << function->getName());
manager->signal_new_function(function);
}
LOG4CXX_INFO(logger, "No Symbols found, starting at the beginning of the text segment");
disassembleFunctionAt(text_entry);
}
LOG4CXX_INFO(logger, "No Symbols found, starting at the beginning of the text segment");
disassembleFunctionAt(text_entry);
}
SectionRef text_section = sections[".text"];
StringRef bytes;
text_section.getContents(bytes);
StringRefMemoryObject ref(bytes);
// Split blocks where jumps are going inside the block
SectionRef text_section = sections[".text"];
StringRef bytes;
text_section.getContents(bytes);
StringRefMemoryObject ref(bytes);
// Split blocks where jumps are going inside the block
- for (auto it = blocks.begin(); it != blocks.end(); ++it) {
- LLVMBasicBlock * current_block = it->second;
+ for (auto it = function->blocks().begin();
+ it != function->blocks().end();
+ ++it) {
+ BasicBlock * current_block = it->second;
if(llvm::MCDisassembler::Success ==
DisAsm->getInstruction(inst, inst_size, ref, current_address, nulls(), nulls())) {
if(llvm::MCDisassembler::Success ==
DisAsm->getInstruction(inst, inst_size, ref, current_address, nulls(), nulls())) {
if (other != blocks.end()) {
uint64_t endaddress = current_address + inst_size + base_address;
if (endaddress != current_block->getEndAddress()) {
if (other != blocks.end()) {
uint64_t endaddress = current_address + inst_size + base_address;
if (endaddress != current_block->getEndAddress()) {
- std::function<void (uint8_t*, size_t, const std::string&)> fun) {
+ std::function<void (uint8_t*, size_t,
+ const std::string&)> fun) {