fcml  1.2.2
Public Member Functions | List of all members
fcml::DisassemblerContext Class Reference

Disassembler context. More...

#include <fcml_disassembler.hpp>

Public Member Functions

 DisassemblerContext ()
 Creates empty disassembler context. More...
 
 DisassemblerContext (fcml_ptr code, fcml_usize codeLength)
 Creates disassembler context for given piece of machine code. More...
 
fcml_ptr getCode () const
 Gets pointer to the machine code buffer. More...
 
void setCode (fcml_ptr code)
 Sets a new buffer with machine code for the context. More...
 
fcml_usize getCodeLength () const
 Gets length of the buffer in bytes. More...
 
void setCodeLength (fcml_usize codeLength)
 Sets length of the code buffer in bytes. More...
 
const DisassemblerConfgetDisassemblerConf () const
 Gets a reference to the configuration object associated with the context. More...
 
DisassemblerConfgetDisassemblerConf ()
 Gets a reference to the configuration object associated with the context. More...
 
void setDisassemblerConf (DisassemblerConf disassemblerConf)
 Sets a new disassembler configuration for the context. More...
 
const EntryPointgetEntryPoint () const
 Gets reference to the constant entry point instance associated with the context. More...
 
EntryPointgetEntryPoint ()
 Gets reference to the entry point instance associated with the context. More...
 
void setEntryPoint (const EntryPoint &entryPoint)
 Copies given entry point to the instance associated with the context. More...
 
void setIP (fcml_ip ip)
 Sets instruction pointer directly into the entry point. More...
 
void incrementIP (fcml_ip ip)
 Increments entry point by given number of bytes. More...
 
void setOperatingMode (EntryPoint::OperatingMode operatingMode)
 Sets processor operating mode directly into the entry point. More...
 
void setAddressSizeAttribute (fcml_usize addressSizeAttribute)
 Sets a new address size attribute for the entry point. More...
 
void setOperandSizeAttribute (fcml_usize operandSizeAttribute)
 Sets a new operand size attribute for the entry point. More...
 

Detailed Description

Disassembler context.

Since
1.1.0

Constructor & Destructor Documentation

◆ DisassemblerContext() [1/2]

fcml::DisassemblerContext::DisassemblerContext ( )
inline

Creates empty disassembler context.

Since
1.1.0

◆ DisassemblerContext() [2/2]

fcml::DisassemblerContext::DisassemblerContext ( fcml_ptr  code,
fcml_usize  codeLength 
)
inline

Creates disassembler context for given piece of machine code.

Parameters
codeA buffer with the machine code.
codeLengthSize of the buffer in bytes.
Since
1.1.0

Member Function Documentation

◆ getCode()

fcml_ptr fcml::DisassemblerContext::getCode ( ) const
inline

Gets pointer to the machine code buffer.

Returns
A pointer to the machine code.
Since
1.1.0

◆ getCodeLength()

fcml_usize fcml::DisassemblerContext::getCodeLength ( ) const
inline

Gets length of the buffer in bytes.

Returns
Size of the buffer.
Since
1.1.0

◆ getDisassemblerConf() [1/2]

const DisassemblerConf& fcml::DisassemblerContext::getDisassemblerConf ( ) const
inline

Gets a reference to the configuration object associated with the context.

Returns
The disassembler configuration.
Since
1.1.0

◆ getDisassemblerConf() [2/2]

DisassemblerConf& fcml::DisassemblerContext::getDisassemblerConf ( )
inline

Gets a reference to the configuration object associated with the context.

Returns
The disassembler configuration.
Since
1.1.0

◆ getEntryPoint() [1/2]

const EntryPoint& fcml::DisassemblerContext::getEntryPoint ( ) const
inline

Gets reference to the constant entry point instance associated with the context.

Returns
Reference to the constant entry point.
Since
1.1.0

◆ getEntryPoint() [2/2]

EntryPoint& fcml::DisassemblerContext::getEntryPoint ( )
inline

Gets reference to the entry point instance associated with the context.

Returns
Reference to the entry point.
Since
1.1.0

◆ incrementIP()

void fcml::DisassemblerContext::incrementIP ( fcml_ip  ip)
inline

Increments entry point by given number of bytes.

Parameters
ipNumber of bytes the instruction pointer has to be incremented by.
Since
1.1.0

◆ setAddressSizeAttribute()

void fcml::DisassemblerContext::setAddressSizeAttribute ( fcml_usize  addressSizeAttribute)
inline

Sets a new address size attribute for the entry point.

Parameters
addressSizeAttributeThe address size attribute.
Since
1.1.0

◆ setCode()

void fcml::DisassemblerContext::setCode ( fcml_ptr  code)
inline

Sets a new buffer with machine code for the context.

Parameters
codeThe new code buffer.
Since
1.1.0

◆ setCodeLength()

void fcml::DisassemblerContext::setCodeLength ( fcml_usize  codeLength)
inline

Sets length of the code buffer in bytes.

Parameters
codeLengthSize of the code.
Since
1.1.0

◆ setDisassemblerConf()

void fcml::DisassemblerContext::setDisassemblerConf ( DisassemblerConf  disassemblerConf)
inline

Sets a new disassembler configuration for the context.

Parameters
disassemblerConfThe new disassembler configuration.
Since
1.1.0

◆ setEntryPoint()

void fcml::DisassemblerContext::setEntryPoint ( const EntryPoint entryPoint)
inline

Copies given entry point to the instance associated with the context.

Deep copy is performed, so passed object not need to be maintained as long as the context is used.

Parameters
entryPointThe entry point which is copied to the context.
Since
1.1.0

◆ setIP()

void fcml::DisassemblerContext::setIP ( fcml_ip  ip)
inline

Sets instruction pointer directly into the entry point.

Parameters
ipThe new IP.
Since
1.1.0

◆ setOperandSizeAttribute()

void fcml::DisassemblerContext::setOperandSizeAttribute ( fcml_usize  operandSizeAttribute)
inline

Sets a new operand size attribute for the entry point.

Parameters
operandSizeAttributeThe operand size attribute.
Since
1.1.0

◆ setOperatingMode()

void fcml::DisassemblerContext::setOperatingMode ( EntryPoint::OperatingMode  operatingMode)
inline

Sets processor operating mode directly into the entry point.

Parameters
operatingModeProcessor operating mode to be set.
Since
1.1.0

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