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 p6
 
uint64_t error
 
uint64_t error_ptr
 
uint64_t result
 
uint64_t rsp
 

Friends

class HostedProcessorState
 
class HostedSyscallManager
 

Detailed Description

x64 Syscall State

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

Member Function Documentation

◆ getBasePointer()

uintptr_t HostedSyscallState::getBasePointer ( ) const
inline

Get the base-pointer

Returns
the base-pointer

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

◆ getInstructionPointer()

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.

◆ getRegister()

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 62 of file hosted/state.cc.

◆ getRegisterCount()

size_t HostedSyscallState::getRegisterCount ( ) const

Get the number of registers

Returns
the number of registers

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

◆ getRegisterName()

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 66 of file hosted/state.cc.

◆ getRegisterSize()

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 333 of file hosted/state.h.

◆ getStackPointer()

uintptr_t HostedSyscallState::getStackPointer ( ) const
inline

Get the stack-pointer before the syscall occured

Returns
the stack-pointer before the syscall

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

◆ getSyscallNumber()

size_t HostedSyscallState::getSyscallNumber ( ) const
inline

Get the syscall function number

Returns
the syscall function number

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

◆ getSyscallParameter()

uintptr_t HostedSyscallState::getSyscallParameter ( size_t  n) const
inline

Get the n'th parameter for this syscall.

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

◆ getSyscallService()

size_t HostedSyscallState::getSyscallService ( ) const
inline

Get the syscall service number

Returns
the syscall service number

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

◆ setBasePointer()

void HostedSyscallState::setBasePointer ( uintptr_t  basePointer)
inline

Set the base-pointer

Parameters
[in]basePointerthe new base-pointer

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

◆ setInstructionPointer()

void HostedSyscallState::setInstructionPointer ( uintptr_t  instructionPointer)
inline

Set the instruction-pointer

Parameters
[in]instructionPointerthe new instruction-pointer

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

◆ setStackPointer()

void HostedSyscallState::setStackPointer ( uintptr_t  stackPointer)
inline

Set the userspace stack-pointer

Parameters
[in]stackPointerthe new stack-pointer

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

◆ setSyscallErrno()

void HostedSyscallState::setSyscallErrno ( uintptr_t  val)
inline

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

◆ setSyscallReturnValue()

void HostedSyscallState::setSyscallReturnValue ( uintptr_t  val)
inline

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

Friends And Related Symbol Documentation

◆ HostedProcessorState

friend class HostedProcessorState
friend

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

◆ HostedSyscallManager

friend class HostedSyscallManager
friend

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

Member Data Documentation

◆ error

uint64_t HostedSyscallState::error

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

◆ error_ptr

uint64_t HostedSyscallState::error_ptr

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

◆ number

uint64_t HostedSyscallState::number

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

◆ p1

uint64_t HostedSyscallState::p1

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

◆ p2

uint64_t HostedSyscallState::p2

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

◆ p3

uint64_t HostedSyscallState::p3

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

◆ p4

uint64_t HostedSyscallState::p4

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

◆ p5

uint64_t HostedSyscallState::p5

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

◆ p6

uint64_t HostedSyscallState::p6

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

◆ result

uint64_t HostedSyscallState::result

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

◆ rsp

uint64_t HostedSyscallState::rsp

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

◆ service

uint64_t HostedSyscallState::service

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


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