ReXGlue SDK
Loading...
Searching...
No Matches
rex::kernel::GuestModule Class Referenceabstract
Inheritance diagram for rex::kernel::GuestModule:
[legend]

Public Member Functions

 GuestModule (FunctionDispatcher *function_dispatcher)
kernel::GuestAddressSpace * GetAddressSpace () const
FunctionDispatcher * GetFunctionDispatcher () const
virtual const std::string & GetName () const =0
virtual bool IsExecutable () const =0
virtual u32 GetBaseAddress () const
virtual u32 GetImageSize () const
virtual u32 GetEntryPoint () const
virtual u32 GetExportTableAddress () const
virtual u32 GetExceptionDirectoryRVA () const
virtual u32 GetExceptionDirectorySize () const
virtual u32 GetExceptionDirectoryAddress () const
bool IsExecutableAddress (u32 address) const
virtual std::span< const BinarySection > GetBinarySections () const
virtual const BinarySection * FindSectionByAddress (u32 address) const
virtual std::span< const BinarySymbol > GetBinarySymbols () const

Protected Attributes

FunctionDispatcher * function_dispatcher_ = nullptr
kernel::GuestAddressSpace * memory_ = nullptr
std::vector< BinarySection > binary_sections_
std::vector< BinarySymbol > binary_symbols_

Constructor & Destructor Documentation

◆ GuestModule()

rex::kernel::GuestModule::GuestModule ( FunctionDispatcher * function_dispatcher)
explicit

Builds a module.

Parameters
function_dispatcherThe dispatcher that supplies the memory, may be null.

Member Function Documentation

◆ FindSectionByAddress()

virtual const BinarySection * rex::kernel::GuestModule::FindSectionByAddress ( u32 address) const
virtual
Returns
The section, or null when none contains the address.

◆ GetBaseAddress()

virtual u32 rex::kernel::GuestModule::GetBaseAddress ( ) const
inlinevirtual
Returns
The guest address, 0 by default.

Reimplemented in rex::kernel::ELFModule, and rex::kernel::XEXModule.

◆ GetBinarySections()

virtual std::span< const BinarySection > rex::kernel::GuestModule::GetBinarySections ( ) const
virtual

Returns the binary sections, empty by default.

Reimplemented in rex::kernel::XEXModule.

◆ GetBinarySymbols()

virtual std::span< const BinarySymbol > rex::kernel::GuestModule::GetBinarySymbols ( ) const
virtual

Returns the binary symbols, empty by default.

Reimplemented in rex::kernel::XEXModule.

◆ GetEntryPoint()

virtual u32 rex::kernel::GuestModule::GetEntryPoint ( ) const
inlinevirtual
Returns
The guest address, 0 by default.

Reimplemented in rex::kernel::ELFModule, and rex::kernel::XEXModule.

◆ GetExceptionDirectoryAddress()

virtual u32 rex::kernel::GuestModule::GetExceptionDirectoryAddress ( ) const
inlinevirtual

Returns the guest address of the PDATA table in the exception data directory, 0 by default.

Reimplemented in rex::kernel::XEXModule.

◆ GetExceptionDirectoryRVA()

virtual u32 rex::kernel::GuestModule::GetExceptionDirectoryRVA ( ) const
inlinevirtual

Returns the RVA of the PDATA table in the exception data directory, 0 by default.

Reimplemented in rex::kernel::XEXModule.

◆ GetExceptionDirectorySize()

virtual u32 rex::kernel::GuestModule::GetExceptionDirectorySize ( ) const
inlinevirtual

Returns the size of the PDATA table in the exception data directory, 0 by default.

Reimplemented in rex::kernel::XEXModule.

◆ GetExportTableAddress()

virtual u32 rex::kernel::GuestModule::GetExportTableAddress ( ) const
inlinevirtual
Returns
The guest address, 0 by default.

Reimplemented in rex::kernel::XEXModule.

◆ GetImageSize()

virtual u32 rex::kernel::GuestModule::GetImageSize ( ) const
inlinevirtual
Returns
The size in bytes, 0 by default.

Reimplemented in rex::kernel::ELFModule, and rex::kernel::XEXModule.

◆ IsExecutable()

virtual bool rex::kernel::GuestModule::IsExecutable ( ) const
pure virtual

Member Data Documentation

◆ binary_sections_

std::vector<BinarySection> rex::kernel::GuestModule::binary_sections_
protected

Populated by derived classes.


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