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

#include <state.h>

+ Collaboration diagram for X64ProcessorState:

Public Member Functions

 X64ProcessorState ()
 
 X64ProcessorState (const X64ProcessorState &)
 
 X64ProcessorState (const X64InterruptState &)
 
 X64ProcessorState (const X64SyscallState &)
 
X64ProcessorStateoperator= (const X64ProcessorState &)
 
X64ProcessorStateoperator= (const X64InterruptState &)
 
X64ProcessorStateoperator= (const X64SyscallState &)
 
 ~X64ProcessorState ()
 
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)
 

Public Attributes

uint64_t r15
 
uint64_t r14
 
uint64_t r13
 
uint64_t r12
 
uint64_t r11
 
uint64_t r10
 
uint64_t r9
 
uint64_t r8
 
uint64_t rbp
 
uint64_t rsi
 
uint64_t rdi
 
uint64_t rdx
 
uint64_t rcx
 
uint64_t rbx
 
uint64_t rax
 
uint64_t rip
 
uint64_t rflags
 
uint64_t rsp
 

Detailed Description

x64 ProcessorState

Definition at line 321 of file x64/state.h.

Constructor & Destructor Documentation

◆ X64ProcessorState() [1/4]

X64ProcessorState::X64ProcessorState ( )
inline

Default constructor initializes everything with 0

Definition at line 550 of file x64/state.h.

◆ X64ProcessorState() [2/4]

X64ProcessorState::X64ProcessorState ( const X64ProcessorState x)
inline

Copy-constructor

Definition at line 569 of file x64/state.h.

◆ X64ProcessorState() [3/4]

X64ProcessorState::X64ProcessorState ( const X64InterruptState x)
inline

Construct a ProcessorState object from an InterruptState object

Parameters
[in]xreference to the InterruptState object

Definition at line 588 of file x64/state.h.

◆ X64ProcessorState() [4/4]

X64ProcessorState::X64ProcessorState ( const X64SyscallState x)
inline

Construct a ProcessorState object from an SyscallState object

Parameters
[in]xreference to the SyscallState object

Definition at line 607 of file x64/state.h.

◆ ~X64ProcessorState()

X64ProcessorState::~X64ProcessorState ( )
inline

Destructor does nothing

Definition at line 689 of file x64/state.h.

Member Function Documentation

◆ getBasePointer()

uintptr_t X64ProcessorState::getBasePointer ( ) const
inline

Get the base-pointer

Returns
the base-pointer

Definition at line 703 of file x64/state.h.

References rbp.

◆ getInstructionPointer()

uintptr_t X64ProcessorState::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 697 of file x64/state.h.

References rip.

◆ getStackPointer()

uintptr_t X64ProcessorState::getStackPointer ( ) const
inline

Get the stack-pointer before the interrupt occured

Returns
the stack-pointer before the interrupt

Definition at line 691 of file x64/state.h.

References rsp.

Referenced by X64InterruptState::construct().

+ Here is the caller graph for this function:

◆ operator=() [1/3]

X64ProcessorState & X64ProcessorState::operator= ( const X64InterruptState x)
inline

◆ operator=() [2/3]

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

Assignment operator

Definition at line 626 of file x64/state.h.

References r10, r11, r12, r13, r14, r15, r8, r9, rax, rbp, rbx, rcx, rdi, rdx, rflags, rip, rsi, and rsp.

◆ operator=() [3/3]

X64ProcessorState & X64ProcessorState::operator= ( const X64SyscallState x)
inline

◆ setBasePointer()

void X64ProcessorState::setBasePointer ( uintptr_t  basePointer)
inline

Set the base-pointer

Parameters
[in]basePointerthe new base-pointer

Definition at line 706 of file x64/state.h.

References rbp.

◆ setInstructionPointer()

void X64ProcessorState::setInstructionPointer ( uintptr_t  instructionPointer)
inline

Set the instruction-pointer

Parameters
[in]instructionPointerthe new instruction-pointer

Definition at line 700 of file x64/state.h.

References rip.

◆ setStackPointer()

void X64ProcessorState::setStackPointer ( uintptr_t  stackPointer)
inline

Set the userspace stack-pointer

Parameters
[in]stackPointerthe new stack-pointer

Definition at line 694 of file x64/state.h.

References rsp.

Member Data Documentation

◆ r10

uint64_t X64ProcessorState::r10

The R10 general purpose register

Definition at line 378 of file x64/state.h.

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

◆ r11

uint64_t X64ProcessorState::r11

The R11 general purpose register

Definition at line 376 of file x64/state.h.

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

◆ r12

uint64_t X64ProcessorState::r12

The R12 general purpose register

Definition at line 374 of file x64/state.h.

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

◆ r13

uint64_t X64ProcessorState::r13

The R13 general purpose register

Definition at line 372 of file x64/state.h.

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

◆ r14

uint64_t X64ProcessorState::r14

The R14 general purpose register

Definition at line 370 of file x64/state.h.

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

◆ r15

uint64_t X64ProcessorState::r15

The R15 general purpose register

Definition at line 368 of file x64/state.h.

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

◆ r8

uint64_t X64ProcessorState::r8

The R8 general purpose register

Definition at line 382 of file x64/state.h.

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

◆ r9

uint64_t X64ProcessorState::r9

The R9 general purpose register

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

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

◆ rax

uint64_t X64ProcessorState::rax

The RAX general purpose register

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

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

◆ rbp

uint64_t X64ProcessorState::rbp

The base-pointer

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

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

◆ rbx

uint64_t X64ProcessorState::rbx

The RBX general purpose register

Definition at line 394 of file x64/state.h.

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

◆ rcx

uint64_t X64ProcessorState::rcx

The RCX general purpose register

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

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

◆ rdi

uint64_t X64ProcessorState::rdi

The RDI general purpose register

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

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

◆ rdx

uint64_t X64ProcessorState::rdx

The RDX general purpose register

Definition at line 390 of file x64/state.h.

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

◆ rflags

uint64_t X64ProcessorState::rflags

The RFlags register

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

Referenced by operator=(), operator=(), and operator=().

◆ rip

uint64_t X64ProcessorState::rip

The instruction-pointer

Definition at line 398 of file x64/state.h.

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

◆ rsi

uint64_t X64ProcessorState::rsi

The RSI general purpose register

Definition at line 386 of file x64/state.h.

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

◆ rsp

uint64_t X64ProcessorState::rsp

The stack-pointer

Definition at line 402 of file x64/state.h.

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


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