LLVM API Documentation
#include <MCObjectDisassembler.h>
Public Member Functions | |
MCMachOObjectDisassembler (const object::MachOObjectFile &MOOF, const MCDisassembler &Dis, const MCInstrAnalysis &MIA, uint64_t VMAddrSlide, uint64_t HeaderLoadAddress) | |
Construct a Mach-O specific object disassembler. More... | |
![]() | |
MCObjectDisassembler (const object::ObjectFile &Obj, const MCDisassembler &Dis, const MCInstrAnalysis &MIA) | |
virtual | ~MCObjectDisassembler () |
MCModule * | buildModule (bool withCFG=false) |
Build an MCModule, creating atoms and optionally functions. More... | |
MCModule * | buildEmptyModule () |
MCFunction * | createFunction (MCModule *Module, uint64_t BeginAddr, AddressSetTy &CallTargets, AddressSetTy &TailCallTargets) |
void | setFallbackRegion (OwningPtr< MemoryObject > &Region) |
Set the region on which to fallback if disassembly was requested somewhere not accessible in the object file. This is used for dynamic disassembly (see RawMemoryObject). More... | |
void | setSymbolizer (MCObjectSymbolizer *ObjectSymbolizer) |
Set the symbolizer to use to get information on external functions. Note that this isn't used to do instruction-level symbolization (that is, plugged into MCDisassembler), but to symbolize function call targets. More... | |
Protected Member Functions | |
uint64_t | getEffectiveLoadAddr (uint64_t Addr) LLVM_OVERRIDE |
uint64_t | getOriginalLoadAddr (uint64_t EffectiveAddr) LLVM_OVERRIDE |
Compute the original load address, as specified in the objectfile. This is the inverse of getEffectiveLoadAddr. More... | |
uint64_t | getEntrypoint () LLVM_OVERRIDE |
Get the effective address of the entrypoint, or 0 if there is none. More... | |
ArrayRef< uint64_t > | getStaticInitFunctions () LLVM_OVERRIDE |
ArrayRef< uint64_t > | getStaticExitFunctions () LLVM_OVERRIDE |
![]() | |
MemoryObject * | getRegionFor (uint64_t Addr) |
Return a memory region suitable for reading starting at Addr . In most cases, this returns a StringRefMemoryObject backed by the containing section. When no section was found, this returns the FallbackRegion, if it is suitable. If it is not, or if there is no fallback region, this returns 0. More... | |
Additional Inherited Members | |
![]() | |
typedef std::vector< uint64_t > | AddressSetTy |
![]() | |
const object::ObjectFile & | Obj |
const MCDisassembler & | Dis |
const MCInstrAnalysis & | MIA |
MCObjectSymbolizer * | MOS |
OwningPtr< MemoryObject > | FallbackRegion |
The fallback memory region, outside the object file. More... | |
Definition at line 143 of file MCObjectDisassembler.h.
MCMachOObjectDisassembler::MCMachOObjectDisassembler | ( | const object::MachOObjectFile & | MOOF, |
const MCDisassembler & | Dis, | ||
const MCInstrAnalysis & | MIA, | ||
uint64_t | VMAddrSlide, | ||
uint64_t | HeaderLoadAddress | ||
) |
Construct a Mach-O specific object disassembler.
VMAddrSlide | The virtual address slide applied by dyld. |
HeaderLoadAddress | The load address of the mach_header for this object. |
Definition at line 502 of file MCObjectDisassembler.cpp.
References llvm::object::MachOObjectFile::begin_sections(), llvm::dbgs(), DEBUG, llvm::object::MachOObjectFile::end_sections(), and llvm::object::content_iterator< content_type >::increment().
|
protectedvirtual |
Reimplemented from llvm::MCObjectDisassembler.
Definition at line 528 of file MCObjectDisassembler.cpp.
|
protectedvirtual |
Get the effective address of the entrypoint, or 0 if there is none.
Reimplemented from llvm::MCObjectDisassembler.
Definition at line 537 of file MCObjectDisassembler.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::MachO::load_command::cmd, llvm::MCObjectDisassembler::getEntrypoint(), llvm::object::MachOObjectFile::getFirstLoadCommandInfo(), llvm::object::MachOObjectFile::getHeader(), llvm::object::MachOObjectFile::getNextLoadCommandInfo(), I, llvm::SPII::Load, llvm::MachO::mach_header::ncmds, and llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
protectedvirtual |
Compute the original load address, as specified in the objectfile. This is the inverse of getEffectiveLoadAddr.
Reimplemented from llvm::MCObjectDisassembler.
Definition at line 533 of file MCObjectDisassembler.cpp.
|
protectedvirtual |
Reimplemented from llvm::MCObjectDisassembler.
Definition at line 576 of file MCObjectDisassembler.cpp.
References llvm::StringRef::data(), llvm::object::MachOObjectFile::is64Bit(), and llvm::StringRef::size().
|
protectedvirtual |
Reimplemented from llvm::MCObjectDisassembler.
Definition at line 566 of file MCObjectDisassembler.cpp.
References llvm::StringRef::data(), llvm::object::MachOObjectFile::is64Bit(), and llvm::StringRef::size().