Reoganize Function/BasicBlock creation
[frida/frida.git] / src / disassembler / Disassembler.hxx
1 #ifndef INCLUDE__Disassembler_hxx
2 #define INCLUDE__Disassembler_hxx
3
4 #include <string>
5 #include <functional>
6
7 class Function;
8 class BasicBlock;
9 class InformationManager;
10
11 class Disassembler {
12 public:
13 Disassembler(const std::string& filename, InformationManager* manager) {}
14 virtual ~Disassembler() {}
15
16 virtual void start() = 0;
17 virtual void getSymbols() = 0;
18 virtual uint64_t entryAddress() = 0;
19
20 virtual void printEachInstruction(uint64_t start, uint64_t end,
21 std::function<void (uint8_t*, size_t, const std::string&,
22 const std::string&)> fun) = 0;
23 virtual Function * disassembleFunctionAt(uint64_t address, const std::string& name = "") = 0;
24 protected:
25 virtual bool isFunctionCall(uint64_t address) = 0;
26 virtual bool isJump(uint64_t address) = 0;
27 };
28
29 #endif