Rework API for getting at instructions
[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 #include <list>
7
8 #include "Instruction.hxx"
9
10 class Function;
11 class BasicBlock;
12 class InformationManager;
13
14 class Disassembler {
15 public:
16 Disassembler() {}
17 virtual ~Disassembler() {}
18
19 virtual void start() = 0;
20 virtual void getSymbols() = 0;
21 virtual uint64_t entryAddress() = 0;
22
23 virtual void printEachInstruction(uint64_t start, uint64_t end,
24 std::function<void (uint8_t*, size_t, const std::string&,
25 const std::string&)> fun) = 0;
26 virtual Function * disassembleFunctionAt(uint64_t address, const std::string& name = "") = 0;
27 virtual std::list<Instruction> getInstructions(const BasicBlock* block) = 0;
28 };
29
30 #endif