X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fdisassembler%2Fllvm%2FLLVMDisassembler.hxx;h=87dbefa2c9ed355349dcf892aac5a3a936614dae;hp=ff81be55385890a7ca642d9fa7d50a469ea001ac;hb=c55f9e2b5f5ff83817ab5187eb0122600a4c5cea;hpb=0f91922e40640e00f1208aee5d8c968a698c5d31 diff --git a/src/disassembler/llvm/LLVMDisassembler.hxx b/src/disassembler/llvm/LLVMDisassembler.hxx index ff81be5..87dbefa 100644 --- a/src/disassembler/llvm/LLVMDisassembler.hxx +++ b/src/disassembler/llvm/LLVMDisassembler.hxx @@ -2,11 +2,15 @@ #define INCLUDE__LLVMDisassembler_hxx #include +#include #include #include "include_llvm.hxx" #include "disassembler/Disassembler.hxx" +#include "disassembler/BasicBlock.hxx" +#include "disassembler/Function.hxx" +#include "disassembler/llvm/LLVMBasicBlock.hxx" class LLVMDisassembler @@ -18,7 +22,7 @@ public: void getSymbols(); uint64_t entryAddress(); - void forEachInstruction(const std::string& name, std::function callback) {} + void forEachFunction(std::function callback); BasicBlock * generateControlFlowGraph(const std::string& name); BasicBlock * generateControlFlowGraph(uint64_t address); @@ -28,7 +32,14 @@ protected: bool isJump(uint64_t address) {return false;} private: + void disassemble(); + + void readSymbols(); + void readSections(); + log4cxx::LoggerPtr logger; + std::map blocks; + std::map functions; llvm::Triple triple; std::shared_ptr binary;