The Pedigree Project
0.1
|
#include <state.h>
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) |
uint64_t | getFlags () const |
void | setFlags (uint64_t newFlags) |
Public Attributes | |
uint64_t | m_R15 |
uint64_t | m_R14 |
uint64_t | m_R13 |
uint64_t | m_R12 |
uint64_t | m_R10 |
uint64_t | m_R9 |
uint64_t | m_R8 |
uint64_t | m_Rbp |
uint64_t | m_Rsi |
uint64_t | m_Rdi |
Private Attributes | |
uint64_t | m_Rdx |
uint64_t | m_Rbx |
uint64_t | m_Rax |
uint64_t | m_RFlagsR11 |
uint64_t | m_RipRcx |
uint64_t | m_Rsp |
Friends | |
class | X64ProcessorState |
class | X64SyscallManager |
x64 Syscall State
Definition at line 169 of file x64/state.h.
|
inline |
Get the base-pointer
Definition at line 444 of file x64/state.h.
References X64InterruptState::m_Rbp.
|
inline |
Get the instruction-pointer of the next instruction that is executed after the syscall is processed
Definition at line 436 of file x64/state.h.
processor_register_t X64SyscallState::getRegister | ( | size_t | index | ) | const |
Get a specific register
[in] | index | the index of the register (from 0 to getRegisterCount() - 1) |
Definition at line 123 of file x64/state.cc.
References X64InterruptState::m_R10, X64InterruptState::m_R12, X64InterruptState::m_R13, X64InterruptState::m_R14, X64InterruptState::m_R15, X64InterruptState::m_R8, X64InterruptState::m_R9, X64InterruptState::m_Rax, X64InterruptState::m_Rbp, X64InterruptState::m_Rbx, X64InterruptState::m_Rdi, X64InterruptState::m_Rdx, X64InterruptState::m_Rsi, and X64InterruptState::m_Rsp.
size_t X64SyscallState::getRegisterCount | ( | ) | const |
Get the number of registers
Definition at line 119 of file x64/state.cc.
const char * X64SyscallState::getRegisterName | ( | size_t | index | ) | const |
Get the name of a specific register
[in] | index | the index of the register (from 0 to getRegisterCount() - 1) |
Definition at line 159 of file x64/state.cc.
|
inline |
Get the register's size in bytes
[in] | index | the index of the register (from 0 to getRegisterCount() - 1) |
Definition at line 452 of file x64/state.h.
|
inline |
Get the stack-pointer before the syscall occured
Definition at line 428 of file x64/state.h.
References X64InterruptState::m_Rsp.
|
inline |
Get the syscall function number
Definition at line 461 of file x64/state.h.
References X64InterruptState::m_Rax.
|
inline |
Get the n'th parameter for this syscall.
Definition at line 465 of file x64/state.h.
References Dec, X64InterruptState::m_R10, X64InterruptState::m_R8, X64InterruptState::m_R9, X64InterruptState::m_Rax, X64InterruptState::m_Rbx, X64InterruptState::m_Rdi, X64InterruptState::m_Rdx, X64InterruptState::m_Rsi, and WARNING.
|
inline |
Get the syscall service number
Definition at line 457 of file x64/state.h.
References X64InterruptState::m_Rax.
|
inline |
Set the base-pointer
[in] | basePointer | the new base-pointer |
Definition at line 448 of file x64/state.h.
References X64InterruptState::m_Rbp.
|
inline |
Set the instruction-pointer
[in] | instructionPointer | the new instruction-pointer |
Definition at line 440 of file x64/state.h.
|
inline |
Set the userspace stack-pointer
[in] | stackPointer | the new stack-pointer |
Definition at line 432 of file x64/state.h.
References X64InterruptState::m_Rsp.
uint64_t X64SyscallState::m_R10 |
The R10 general purpose register
Definition at line 244 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_R12 |
The R12 general purpose register
Definition at line 242 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_R13 |
The R14 general purpose register
Definition at line 240 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_R14 |
The R14 general purpose register
Definition at line 238 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_R15 |
The R15 general purpose register
Definition at line 236 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_R8 |
The R8 general purpose register
Definition at line 248 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_R9 |
The R9 general purpose register
Definition at line 246 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
|
private |
The RAX general purpose register
Definition at line 264 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_Rbp |
The base-pointer
Definition at line 250 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
|
private |
The RBX general purpose register
Definition at line 262 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_Rdi |
The RDI general purpose register
Definition at line 256 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
|
private |
The RDX general purpose register
Definition at line 260 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
|
private |
The R11/RFlags register
Definition at line 266 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
|
private |
The RIP/RCX register
Definition at line 268 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
uint64_t X64SyscallState::m_Rsi |
The RSI general purpose register
Definition at line 254 of file x64/state.h.
Referenced by X64ProcessorState::operator=().
|
private |
The stack-pointer
Definition at line 270 of file x64/state.h.
Referenced by X64ProcessorState::operator=().