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

#include <state.h>

+ Collaboration diagram for X86ProcessorState:

Public Member Functions

 X86ProcessorState ()
 
 X86ProcessorState (const X86ProcessorState &x)
 
 X86ProcessorState (const X86InterruptState &x)
 
X86ProcessorStateoperator= (const X86ProcessorState &x)
 
X86ProcessorStateoperator= (const X86InterruptState &x)
 
 ~X86ProcessorState ()
 
uintptr_t getStackPointer () const
 
void setStackPointer (uintptr_t stackPointer)
 
uintptr_t getInstructionPointer () const
 
void setInstructionPointer (uintptr_t instructionPointer)
 
uintptr_t getBasePointer () const
 
void setBasePointer (uintptr_t basePointer)
 
void setSyscallReturnValue (uintptr_t val)
 

Public Attributes

uint32_t edi
 
uint32_t esi
 
uint32_t ebp
 
uint32_t ebx
 
uint32_t edx
 
uint32_t ecx
 
uint32_t eax
 
uint32_t eip
 
uint32_t eflags
 
uint32_t esp
 

Detailed Description

x86 ProcessorState

Definition at line 167 of file x86/state.h.

Constructor & Destructor Documentation

X86ProcessorState::X86ProcessorState ( )
inline

Default constructor initializes everything with 0

Definition at line 337 of file x86/state.h.

X86ProcessorState::X86ProcessorState ( const X86ProcessorState x)
inline

Copy-constructor

Definition at line 341 of file x86/state.h.

X86ProcessorState::X86ProcessorState ( const X86InterruptState x)
inline

Construct a ProcessorState object from an InterruptState object

Parameters
[in]xreference to the InterruptState object

Definition at line 346 of file x86/state.h.

X86ProcessorState::~X86ProcessorState ( )
inline

Destructor does nothing

Definition at line 380 of file x86/state.h.

Member Function Documentation

uintptr_t X86ProcessorState::getBasePointer ( ) const
inline

Get the base-pointer

Returns
the base-pointer

Definition at line 400 of file x86/state.h.

References ebp.

uintptr_t X86ProcessorState::getInstructionPointer ( ) const
inline

Get the instruction-pointer of the next instruction that is executed after the interrupt is processed

Returns
the instruction-pointer

Definition at line 392 of file x86/state.h.

References eip.

uintptr_t X86ProcessorState::getStackPointer ( ) const
inline

Get the stack-pointer before the interrupt occured

Returns
the stack-pointer before the interrupt

Definition at line 384 of file x86/state.h.

References esp.

Referenced by X86InterruptState::construct().

+ Here is the caller graph for this function:

X86ProcessorState & X86ProcessorState::operator= ( const X86ProcessorState x)
inline

Assignment operator

Definition at line 352 of file x86/state.h.

References eax, ebp, ebx, ecx, edi, edx, eflags, eip, esi, and esp.

X86ProcessorState & X86ProcessorState::operator= ( const X86InterruptState x)
inline
void X86ProcessorState::setBasePointer ( uintptr_t  basePointer)
inline

Set the base-pointer

Parameters
[in]basePointerthe new base-pointer

Definition at line 404 of file x86/state.h.

References eax, and ebp.

void X86ProcessorState::setInstructionPointer ( uintptr_t  instructionPointer)
inline

Set the instruction-pointer

Parameters
[in]instructionPointerthe new instruction-pointer

Definition at line 396 of file x86/state.h.

References eip.

void X86ProcessorState::setStackPointer ( uintptr_t  stackPointer)
inline

Set the userspace stack-pointer

Parameters
[in]stackPointerthe new stack-pointer

Definition at line 388 of file x86/state.h.

References esp.

Member Data Documentation

uint32_t X86ProcessorState::eax

The EAX general purpose register

Definition at line 223 of file x86/state.h.

Referenced by X86InterruptState::construct(), operator=(), and setBasePointer().

uint32_t X86ProcessorState::ebp

The base-pointer register

Definition at line 215 of file x86/state.h.

Referenced by X86InterruptState::construct(), getBasePointer(), operator=(), and setBasePointer().

uint32_t X86ProcessorState::ebx

The EBX general purpose register

Definition at line 217 of file x86/state.h.

Referenced by X86InterruptState::construct(), and operator=().

uint32_t X86ProcessorState::ecx

The ECX general purpose register

Definition at line 221 of file x86/state.h.

Referenced by X86InterruptState::construct(), and operator=().

uint32_t X86ProcessorState::edi

The EDI general purpose register

Definition at line 211 of file x86/state.h.

Referenced by X86InterruptState::construct(), and operator=().

uint32_t X86ProcessorState::edx

The EDX general purpose register

Definition at line 219 of file x86/state.h.

Referenced by X86InterruptState::construct(), and operator=().

uint32_t X86ProcessorState::eflags

The extended flags (EFLAGS)

Definition at line 227 of file x86/state.h.

Referenced by operator=().

uint32_t X86ProcessorState::eip

The instruction pointer

Definition at line 225 of file x86/state.h.

Referenced by X86InterruptState::construct(), getInstructionPointer(), operator=(), and setInstructionPointer().

uint32_t X86ProcessorState::esi

The ESI general purpose register

Definition at line 213 of file x86/state.h.

Referenced by X86InterruptState::construct(), and operator=().

uint32_t X86ProcessorState::esp

The stack-pointer

Definition at line 229 of file x86/state.h.

Referenced by X86InterruptState::construct(), getStackPointer(), operator=(), and setStackPointer().


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