]> git.siccegge.de Git - frida/frida.git/blobdiff - src/disassembler/Disassembler.hxx
Properly create and export BasicBlock linking
[frida/frida.git] / src / disassembler / Disassembler.hxx
index 9986ac8e3a0fd4f61f94c25b3da364b36d1a901b..7ad4dc02623d834134b4f38e7f53abf8a17ee595 100644 (file)
@@ -4,7 +4,9 @@
 #include <string>
 #include <functional>
 
-class BasicBlock {};
+#include "disassembler/BasicBlock.hxx"
+#include "disassembler/Function.hxx"
+
 
 class Disassembler {
 public:
@@ -14,11 +16,8 @@ public:
        void getSymbols();
        uint64_t entryAddress();
 
-    virtual void forEachInstruction(const std::string& name, std::function<void (long, std::string, std::string)> callback) = 0;
-
-    // http://llvm.org/docs/doxygen/html/MCObjectDisassembler_8cpp_source.html +197
-       BasicBlock * generateControlFlowGraph(const std::string& name);
-       BasicBlock * generateControlFlowGraph(uint64_t address);
+       virtual void forEachFunction(std::function<void (uint64_t, Function*)> callback) = 0;
+       virtual BasicBlock * getBasicBlock(uint64_t address) = 0;
 
 protected:
     virtual bool isFunctionCall(uint64_t address) = 0;