Process

Struct Process 

Source
pub struct Process { /* private fields */ }

Implementations§

Source§

impl Process

Source

pub fn cleanup_exited_threads( self: &Rc<Self>, main_stop_tid: Pid, ) -> Option<StopReason>

Source

pub fn report_thread_lifecycle_event(self: &Rc<Self>, reason: &StopReason)

Source

pub fn stop_running_threads(self: &Rc<Self>) -> Result<(), SdbError>

Source

pub fn step_instruction( self: &Rc<Self>, otid: Option<Pid>, ) -> Result<StopReason, SdbError>

Source

pub fn wait_on_signal( self: &Rc<Self>, to_await: Pid, ) -> Result<StopReason, SdbError>

Source

pub fn handle_signal( self: &Rc<Self>, reason: StopReason, is_main_stop: bool, ) -> Result<Option<StopReason>, SdbError>

Source

pub fn populate_existing_threads(self: &Rc<Self>)

Source

pub fn create_breakpoint_site( self: &Rc<Self>, address: VirtualAddress, hardware: bool, internal: bool, ) -> Result<Weak<RefCell<BreakpointSite>>, SdbError>

Source

pub fn create_breakpoint_site_from_breakpoint( self: &Rc<Self>, parent: &Rc<RefCell<Breakpoint>>, id: i32, address: VirtualAddress, hardware: bool, internal: bool, ) -> Result<Weak<RefCell<BreakpointSite>>, SdbError>

Source

pub fn create_watchpoint( self: &Rc<Self>, address: VirtualAddress, mode: StoppointMode, size: usize, ) -> Result<Weak<RefCell<WatchPoint>>, SdbError>

Source

pub fn inferior_call( self: &Rc<Self>, func_addr: VirtualAddress, return_addr: VirtualAddress, regs_to_restore: Registers, otid: Option<Pid>, ) -> Result<Registers, SdbError>

Source

pub fn read_string(&self, address: VirtualAddress) -> Result<String, SdbError>

Source

pub fn install_thread_lifecycle_callback<T: Fn(&StopReason) + 'static>( &self, callback: T, )

Source

pub fn resume_all_threads(&self) -> Result<(), SdbError>

Source

pub fn set_current_thread(&self, tid: Pid)

Source

pub fn current_thread(&self) -> Pid

Source

pub fn thread_states(&self) -> &RefCell<HashMap<Pid, Rc<RefCell<ThreadState>>>>

Source

pub fn set_syscall_catch_policy(&self, info: SyscallCatchPolicy)

Source

pub fn pid(&self) -> Pid

Source

pub fn resume(&self, otid: Option<Pid>) -> Result<(), SdbError>

Source

pub fn state(&self) -> ProcessState

Source

pub fn launch( path: &Path, debug: bool, stdout_replacement: Option<i32>, ) -> Result<Rc<Process>, SdbError>

Source

pub fn attach(pid: Pid) -> Result<Rc<Process>, SdbError>

Source

pub fn write_user_area( &self, offset: usize, data: u64, otid: Option<Pid>, ) -> Result<(), SdbError>

Source

pub fn get_registers(&self, otid: Option<Pid>) -> Rc<RefCell<Registers>>

Source

pub fn read_all_registers(&self, tid: Pid) -> Result<(), SdbError>

Source

pub fn write_gprs( &self, gprs: &mut user_regs_struct, otid: Option<Pid>, ) -> Result<(), SdbError>

Source

pub fn write_fprs( &self, fprs: &mut user_fpregs_struct, otid: Option<Pid>, ) -> Result<(), SdbError>

Source

pub fn get_pc(&self, otid: Option<Pid>) -> VirtualAddress

Source

pub fn breakpoint_sites(&self) -> Rc<RefCell<StoppointCollection>>

Source

pub fn set_pc( &self, address: VirtualAddress, otid: Option<Pid>, ) -> Result<(), SdbError>

Source

pub fn read_memory( &self, address: VirtualAddress, amount: usize, ) -> Result<Vec<u8>, SdbError>

Source

pub fn write_memory( &self, address: VirtualAddress, data: &[u8], ) -> Result<(), SdbError>

Source

pub fn read_memory_as<T: Pod>( &self, address: VirtualAddress, ) -> Result<T, SdbError>

Source

pub fn read_memory_without_trap( &self, address: VirtualAddress, amount: usize, ) -> Result<Vec<u8>, SdbError>

Source

pub fn set_hardware_breakpoint( &self, _id: i32, address: VirtualAddress, ) -> Result<i32, SdbError>

Source

pub fn clear_hardware_stoppoint(&self, index: i32) -> Result<(), SdbError>

Source

pub fn set_watchpoint( &self, _id: i32, address: VirtualAddress, mode: StoppointMode, size: usize, ) -> Result<i32, SdbError>

Source

pub fn watchpoints(&self) -> Rc<RefCell<StoppointCollection>>

Source

pub fn get_current_hardware_stoppoint( &self, otid: Option<Pid>, ) -> Result<StoppointId, SdbError>

Source

pub fn get_auxv(&self) -> HashMap<i32, u64>

Source

pub fn set_target(&self, target: &Rc<Target>)

Trait Implementations§

Source§

impl Drop for Process

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl !Freeze for Process

§

impl !RefUnwindSafe for Process

§

impl !Send for Process

§

impl !Sync for Process

§

impl Unpin for Process

§

impl !UnwindSafe for Process

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.