- log4cxx::LoggerPtr logger;
-
- llvm::Triple triple;
- std::shared_ptr<llvm::object::Binary> binary;
-
-
- const llvm::Target * target;
- llvm::object::ObjectFile * o;
-
- std::unique_ptr<const llvm::MCRegisterInfo> MRI;
- std::unique_ptr<const llvm::MCAsmInfo> AsmInfo;
- std::unique_ptr<llvm::MCModule> Mod;
- std::unique_ptr<llvm::MCInstPrinter> IP;
- std::unique_ptr<llvm::MCDisassembler> DisAsm;
- std::unique_ptr<const llvm::MCObjectFileInfo> MOFI;
- std::unique_ptr<llvm::MCContext> Ctx;
- std::unique_ptr<const llvm::MCInstrAnalysis> MIA;
- std::unique_ptr<const llvm::MCSubtargetInfo> STI;
- std::unique_ptr<const llvm::MCInstrInfo> MII;
- llvm::OwningPtr<llvm::MCRelocationInfo> RelInfo;
- llvm::OwningPtr<llvm::MCSymbolizer> Symzer;
-
- std::map<std::string, llvm::object::SectionRef> sections;
- std::map<std::string, llvm::object::SymbolRef> symbols;
+ typedef llvm::object::ELFFile<ELFT> ELFO;
+
+ // http://llvm.org/docs/doxygen/html/MCObjectDisassembler_8cpp_source.html +197
+ void disassembleFunction(LLVMFunction* function);
+ void splitBlocks(LLVMFunction* fun);
+ void disassemble();
+
+ void readSymbols();
+ void readSections();
+ void readDynamicSymbols();
+
+ log4cxx::LoggerPtr logger;
+ std::map<uint64_t, LLVMBasicBlock*> blocks;
+ std::map<uint64_t, LLVMFunction*> functions;
+
+ llvm::Triple triple;
+ std::shared_ptr<llvm::object::Binary> binary;
+
+ const llvm::Target * target;
+ llvm::object::ELFObjectFile<ELFT> * o;
+
+ std::unique_ptr<const llvm::MCRegisterInfo> MRI;
+ std::unique_ptr<const llvm::MCAsmInfo> AsmInfo;
+ std::unique_ptr<llvm::MCModule> Mod;
+ std::unique_ptr<llvm::MCInstPrinter> IP;
+ std::unique_ptr<llvm::MCDisassembler> DisAsm;
+ std::unique_ptr<const llvm::MCObjectFileInfo> MOFI;
+ std::unique_ptr<llvm::MCContext> Ctx;
+ std::unique_ptr<const llvm::MCInstrAnalysis> MIA;
+ std::unique_ptr<const llvm::MCSubtargetInfo> STI;
+ std::unique_ptr<const llvm::MCInstrInfo> MII;
+ std::unique_ptr<llvm::MCRelocationInfo> RelInfo;
+ std::unique_ptr<llvm::MCSymbolizer> Symzer;
+
+ std::map<std::string, llvm::object::SectionRef> sections;
+ std::map<std::string, llvm::object::SymbolRef> symbols;
+ InformationManager * manager;
+ uint64_t _entryAddress;