LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
llvm::MCMachOObjectDisassembler Class Reference

#include <MCObjectDisassembler.h>

Inheritance diagram for llvm::MCMachOObjectDisassembler:
Inheritance graph
[legend]
Collaboration diagram for llvm::MCMachOObjectDisassembler:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from llvm::MCObjectDisassembler
 MCObjectDisassembler (const object::ObjectFile &Obj, const MCDisassembler &Dis, const MCInstrAnalysis &MIA)
 
virtual ~MCObjectDisassembler ()
 
MCModulebuildModule (bool withCFG=false)
 Build an MCModule, creating atoms and optionally functions. More...
 
MCModulebuildEmptyModule ()
 
MCFunctioncreateFunction (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
 
- Protected Member Functions inherited from llvm::MCObjectDisassembler
MemoryObjectgetRegionFor (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

- Public Types inherited from llvm::MCObjectDisassembler
typedef std::vector< uint64_t > AddressSetTy
 
- Protected Attributes inherited from llvm::MCObjectDisassembler
const object::ObjectFileObj
 
const MCDisassemblerDis
 
const MCInstrAnalysisMIA
 
MCObjectSymbolizerMOS
 
OwningPtr< MemoryObjectFallbackRegion
 The fallback memory region, outside the object file. More...
 

Detailed Description

Definition at line 143 of file MCObjectDisassembler.h.

Constructor & Destructor Documentation

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.

Parameters
VMAddrSlideThe virtual address slide applied by dyld.
HeaderLoadAddressThe 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().

Member Function Documentation

uint64_t MCMachOObjectDisassembler::getEffectiveLoadAddr ( uint64_t  Addr)
protectedvirtual

Reimplemented from llvm::MCObjectDisassembler.

Definition at line 528 of file MCObjectDisassembler.cpp.

uint64_t MCMachOObjectDisassembler::getEntrypoint ( )
protectedvirtual
uint64_t MCMachOObjectDisassembler::getOriginalLoadAddr ( uint64_t  EffectiveAddr)
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.

ArrayRef< uint64_t > MCMachOObjectDisassembler::getStaticExitFunctions ( )
protectedvirtual
ArrayRef< uint64_t > MCMachOObjectDisassembler::getStaticInitFunctions ( )
protectedvirtual

The documentation for this class was generated from the following files: