The Pedigree Project 0.1
Public Member Functions | Private Attributes | List of all members
X86Disassembler Class Reference

#include <Disassembler.h>

+ Inheritance diagram for X86Disassembler:
+ Collaboration diagram for X86Disassembler:

Public Member Functions

void setLocation (uintptr_t location)
 
uintptr_t getLocation ()
 
void setMode (size_t mode)
 
void disassemble (LargeStaticString &text)
 
- Public Member Functions inherited from DisassemblerBase
virtual ~DisassemblerBase ()
 

Private Attributes

uintptr_t m_Location
 
int m_Mode
 
ud_t m_Obj
 

Detailed Description

A disassembler for x86/x64 processors.

Definition at line 32 of file kernel/core/processor/x86_common/Disassembler.h.

Constructor & Destructor Documentation

◆ X86Disassembler()

X86Disassembler::X86Disassembler ( )

Definition at line 25 of file x86_common/Disassembler.cc.

◆ ~X86Disassembler()

X86Disassembler::~X86Disassembler ( )

Definition at line 33 of file x86_common/Disassembler.cc.

Member Function Documentation

◆ disassemble()

void X86Disassembler::disassemble ( LargeStaticString &  text)
virtual

Disassembles one instruction and populates the given StaticString with a textual representation.

Implements DisassemblerBase.

Definition at line 53 of file x86_common/Disassembler.cc.

References m_Location, and m_Obj.

Referenced by DisassembleCommand::execute(), and TraceCommand::execute().

+ Here is the caller graph for this function:

◆ getLocation()

uintptr_t X86Disassembler::getLocation ( )
virtual

Gets the location of the next instruction to be disassembled.

Implements DisassemblerBase.

Definition at line 43 of file x86_common/Disassembler.cc.

References m_Location.

Referenced by DisassembleCommand::execute(), and TraceCommand::execute().

+ Here is the caller graph for this function:

◆ setLocation()

void X86Disassembler::setLocation ( uintptr_t  location)
virtual

Sets the location of the next instruction to be disassembled.

Implements DisassemblerBase.

Definition at line 35 of file x86_common/Disassembler.cc.

References m_Location, m_Mode, and m_Obj.

Referenced by DisassembleCommand::execute(), and TraceCommand::execute().

+ Here is the caller graph for this function:

◆ setMode()

void X86Disassembler::setMode ( size_t  mode)
virtual

Sets the mode of disassembly - 16-bit, 32-bit or 64-bit If a disassembler doesn't support a requested mode, it should return without changing anything.

Parameters
modeMode - 16, 32 or 64.

Implements DisassemblerBase.

Definition at line 47 of file x86_common/Disassembler.cc.

References m_Mode, and m_Obj.

Referenced by DisassembleCommand::execute(), and TraceCommand::execute().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_Location

uintptr_t X86Disassembler::m_Location
private

Current disassembling location in memory.

Definition at line 65 of file kernel/core/processor/x86_common/Disassembler.h.

Referenced by disassemble(), getLocation(), and setLocation().

◆ m_Mode

int X86Disassembler::m_Mode
private

Current mode.

Definition at line 70 of file kernel/core/processor/x86_common/Disassembler.h.

Referenced by setLocation(), and setMode().

◆ m_Obj

ud_t X86Disassembler::m_Obj
private

Disassembler object.

Definition at line 75 of file kernel/core/processor/x86_common/Disassembler.h.

Referenced by disassemble(), setLocation(), and setMode().


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