X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2FBinary.hxx;h=180d8eefe04948d73455a9edafe7051fee14fa35;hp=31d7485b8fd6ea8d6706f0764131cf3b2c94a8a1;hb=37e3e9570967efad39ba74213f51bd12aebe4c8c;hpb=41956000342f6d21aaa3b4a429a852ba6bffcbbd diff --git a/src/Binary.hxx b/src/Binary.hxx index 31d7485..180d8ee 100644 --- a/src/Binary.hxx +++ b/src/Binary.hxx @@ -1,34 +1,52 @@ +#ifndef INCLUDE__Binary_hxx +#define INCLUDE__Binary_hxx + #include "include.hxx" +#include "Section.hxx" #include +#include +#include using llvm::OwningPtr; -class Binary { -private: - llvm::Triple triple; - const llvm::Target * target; - llvm::object::ObjectFile * o; - - OwningPtr binary; - OwningPtr MRI; - OwningPtr AsmInfo; - OwningPtr Mod; - OwningPtr IP; - OwningPtr DisAsm; - OwningPtr MOFI; - OwningPtr Ctx; - OwningPtr MIA; - OwningPtr STI; - OwningPtr MII; - OwningPtr RelInfo; - OwningPtr Symzer; -public: - Binary(const std::string& filename); - - void disassemble(); - - void disassemble_functions(); - - void disassemble_cfg(); -}; +namespace qtlldb { + 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; + OwningPtr MRI; + OwningPtr AsmInfo; + OwningPtr Mod; + OwningPtr IP; + OwningPtr DisAsm; + OwningPtr MOFI; + OwningPtr Ctx; + OwningPtr MIA; + OwningPtr STI; + OwningPtr MII; + OwningPtr RelInfo; + OwningPtr Symzer; + + std::map sections; + std::map symbols; + }; +} +#endif