X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2FBinary.hxx;h=1a865783f850633d6fbb4e8c80e0542168ddd3c1;hp=aa5460e408e075ee9c91133ae8aa5a4d52e05a59;hb=59181afa72eb08a7716d5bebd83b0be6a972e5f1;hpb=988726af7276c31122cd2e27adae87aa8b4049ad diff --git a/src/Binary.hxx b/src/Binary.hxx index aa5460e..1a86578 100644 --- a/src/Binary.hxx +++ b/src/Binary.hxx @@ -1,16 +1,36 @@ -#include "include.hxx" +#ifndef INCLUDE__Binary_hxx +#define INCLUDE__Binary_hxx + +#include "include_llvm.hxx" +#include "Section.hxx" #include +#include +#include using llvm::OwningPtr; class Binary { +public: + Binary(const std::string& filename); + + void disassemble(); + + void disassemble_functions(); + + void disassemble_cfg(); + + std::vector getSymbols(); + + std::vector getFunctions(); + void for_each_instruction(const std::string& function, std::function callback); + private: llvm::Triple triple; const llvm::Target * target; llvm::object::ObjectFile * o; - OwningPtr binary; + llvm::object::Binary* binary; OwningPtr MRI; OwningPtr AsmInfo; OwningPtr Mod; @@ -23,10 +43,8 @@ private: OwningPtr MII; OwningPtr RelInfo; OwningPtr Symzer; -public: - Binary(const std::string& filename); - - void disassemble(); - void disassemble_functions(); + std::map sections; + std::map symbols; }; +#endif