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

#include <state.h>

+ Collaboration diagram for HostedSyscallState:

Public Member Functions

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)
 
size_t getRegisterCount () const
 
processor_register_t getRegister (size_t index) const
 
const char * getRegisterName (size_t index) const
 
size_t getRegisterSize (size_t index) const
 
size_t getSyscallService () const
 
size_t getSyscallNumber () const
 
uintptr_t getSyscallParameter (size_t n) const
 
void setSyscallReturnValue (uintptr_t val)
 
void setSyscallErrno (uintptr_t val)
 

Public Attributes

uint64_t service
 
uint64_t number
 
uint64_t p1
 
uint64_t p2
 
uint64_t p3
 
uint64_t p4
 
uint64_t p5
 
uint64_t error
 
uint64_t error_ptr
 
uint64_t result
 
uint64_t rsp
 
uint64_t _align0
 

Friends

class HostedProcessorState
 
class HostedSyscallManager
 

Detailed Description

x64 Syscall State

Definition at line 135 of file hosted/state.h.

Member Function Documentation

uintptr_t HostedSyscallState::getBasePointer ( ) const
inline

Get the base-pointer

Returns
the base-pointer

Definition at line 332 of file hosted/state.h.

uintptr_t HostedSyscallState::getInstructionPointer ( ) const
inline

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

Returns
the instruction-pointer

Definition at line 325 of file hosted/state.h.

processor_register_t HostedSyscallState::getRegister ( size_t  index) const

Get a specific register

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the value of the register

Definition at line 60 of file hosted/state.cc.

size_t HostedSyscallState::getRegisterCount ( ) const

Get the number of registers

Returns
the number of registers

Definition at line 55 of file hosted/state.cc.

const char * HostedSyscallState::getRegisterName ( size_t  index) const

Get the name of a specific register

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the name of the register

Definition at line 65 of file hosted/state.cc.

size_t HostedSyscallState::getRegisterSize ( size_t  index) const
inline

Get the register's size in bytes

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the register size in bytes

Definition at line 339 of file hosted/state.h.

uintptr_t HostedSyscallState::getStackPointer ( ) const
inline

Get the stack-pointer before the syscall occured

Returns
the stack-pointer before the syscall

Definition at line 317 of file hosted/state.h.

size_t HostedSyscallState::getSyscallNumber ( ) const
inline

Get the syscall function number

Returns
the syscall function number

Definition at line 348 of file hosted/state.h.

uintptr_t HostedSyscallState::getSyscallParameter ( size_t  n) const
inline

Get the n'th parameter for this syscall.

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

size_t HostedSyscallState::getSyscallService ( ) const
inline

Get the syscall service number

Returns
the syscall service number

Definition at line 344 of file hosted/state.h.

void HostedSyscallState::setBasePointer ( uintptr_t  basePointer)
inline

Set the base-pointer

Parameters
[in]basePointerthe new base-pointer

Definition at line 336 of file hosted/state.h.

void HostedSyscallState::setInstructionPointer ( uintptr_t  instructionPointer)
inline

Set the instruction-pointer

Parameters
[in]instructionPointerthe new instruction-pointer

Definition at line 329 of file hosted/state.h.

void HostedSyscallState::setStackPointer ( uintptr_t  stackPointer)
inline

Set the userspace stack-pointer

Parameters
[in]stackPointerthe new stack-pointer

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


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