pub struct ProcessFrame<T>where
T: ProcessIdentifier,{ /* private fields */ }
Expand description
Represents a traced process which is in the process of building a frame
.
frame
can be thought of a mutable view into a stopped process’s execution.
Given you own a process frame, it is an appropriate time to edit registers, change instructions, and edit memory.
Implementations§
Source§impl<T> ProcessFrame<T>where
T: ProcessIdentifier,
impl<T> ProcessFrame<T>where
T: ProcessIdentifier,
Sourcepub fn query_registers(&mut self) -> Result<UserRegs, TraceError>
pub fn query_registers(&mut self) -> Result<UserRegs, TraceError>
gets process frame registers. internally uses GETREGS
Sourcepub fn set_registers(&mut self, registers: UserRegs) -> Result<(), TraceError>
pub fn set_registers(&mut self, registers: UserRegs) -> Result<(), TraceError>
sets a process frame registers. internally uses SETREGS
Sourcepub fn invoke_remote(
self,
func_address: usize,
return_address: usize,
parameters: &[usize],
) -> Result<(UserRegs, ProcessFrame<T>), TraceError>
pub fn invoke_remote( self, func_address: usize, return_address: usize, parameters: &[usize], ) -> Result<(UserRegs, ProcessFrame<T>), TraceError>
Attempts to invoke a remote function with the provided parameters. Internally this is an os cfg controlled function that write the inputted parameters according to the architectures expectations. Additionally it prepares the provided return address
Sourcepub fn read_memory(
&mut self,
addr: usize,
len: usize,
) -> Result<Vec<u8>, TraceError>
pub fn read_memory( &mut self, addr: usize, len: usize, ) -> Result<Vec<u8>, TraceError>
Attempts to read a process’s memory from fs
Sourcepub fn read_memory_mut(
&self,
addr: usize,
data: &mut [u8],
) -> Result<usize, TraceError>
pub fn read_memory_mut( &self, addr: usize, data: &mut [u8], ) -> Result<usize, TraceError>
Attempts to read a mutable section of a process’s memory from fs
Sourcepub fn write_memory(
&mut self,
addr: usize,
data: &[u8],
) -> Result<usize, TraceError>
pub fn write_memory( &mut self, addr: usize, data: &[u8], ) -> Result<usize, TraceError>
Attempts to write to a section of the process’s memory