#define INCLUDE__LLVMDisassembler_hxx
#include <memory>
+#include <map>
#include <log4cxx/logger.h>
#include "include_llvm.hxx"
#include "disassembler/Disassembler.hxx"
+#include "disassembler/llvm/LLVMBasicBlock.hxx"
class LLVMDisassembler
void getSymbols();
uint64_t entryAddress();
- void forEachInstruction(const std::string& name, std::function<void (long, std::string, std::string)> callback) {}
+ void forEachInstruction(const std::string& name,
+ std::function<void (long, std::string, std::string)> callback)
+ {}
BasicBlock * generateControlFlowGraph(const std::string& name);
BasicBlock * generateControlFlowGraph(uint64_t address);
bool isJump(uint64_t address) {return false;}
private:
+ void disassemble();
+
+ void readSymbols();
+ void readSections();
+
log4cxx::LoggerPtr logger;
+ std::map<uint8_t, LLVMBasicBlock*> blocks;
llvm::Triple triple;
std::shared_ptr<llvm::object::Binary> binary;