#[repr(C)]pub struct RegisterContext {}Expand description
x86_64 register context captured at function entry
Fields§
§rdi: u64§rsi: u64§rdx: u64§rcx: u64§r8: u64§r9: u64§rsp: u64§rbp: u64§xmm: [f64; 8]§rip: u64§rflags: u64§valid: bool§timestamp: u64§return_rax: u64§return_xmm0: f64§return_valid: boolImplementations§
Source§impl RegisterContext
impl RegisterContext
Sourcepub unsafe fn capture() -> Result<Self>
pub unsafe fn capture() -> Result<Self>
Capture current register context using inline assembly
§Safety
This function uses inline assembly and must be called very early in the function entry hook before registers are modified.
Sourcepub fn get_integer_register(&self, index: usize) -> Option<u64>
pub fn get_integer_register(&self, index: usize) -> Option<u64>
Get integer register value by index (0-5 for RDI, RSI, RDX, RCX, R8, R9)
Sourcepub fn get_sse_register(&self, index: usize) -> Option<f64>
pub fn get_sse_register(&self, index: usize) -> Option<f64>
Get SSE register value by index (0-7 for XMM0-XMM7)
Trait Implementations§
Source§impl Clone for RegisterContext
impl Clone for RegisterContext
Source§fn clone(&self) -> RegisterContext
fn clone(&self) -> RegisterContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegisterContext
impl Debug for RegisterContext
Source§impl<'de> Deserialize<'de> for RegisterContext
impl<'de> Deserialize<'de> for RegisterContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegisterContext
impl RefUnwindSafe for RegisterContext
impl Send for RegisterContext
impl Sync for RegisterContext
impl Unpin for RegisterContext
impl UnsafeUnpin for RegisterContext
impl UnwindSafe for RegisterContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more