[−][src]Struct ptracer::Ptracer
Ptrace wraps ptrace
syscalls to enable writing an debugger.
WARNING: Only one concurrent instance is currently supported!
Implementations
impl Ptracer
[src]
pub fn spawn(path: &Path, args: &[String]) -> Result<Self>
[src]
Spawn a new debugee.
Set ptrace options for exec/fork/exit variants.
Disable ASLR (linux only).
WARNING: Only one concurrent instance is currently supported!
pub fn insert_breakpoint(&mut self, address: usize) -> Result<()>
[src]
Insert a new breakpoint.
If breakpoint exists, do nothing.
pub fn enable_breakpoint(&mut self, address: usize) -> Result<()>
[src]
Enable a breakpoint.
If breakpoint does not exists, do nothing.
If breakpoint is enabled, do nothing.
pub fn disable_breakpoint(&mut self, address: usize) -> Result<()>
[src]
Disable a breakpoint.
If breakpoint does not exists, do nothing.
If breakpoint is disabled, do nothing.
pub fn remove_breakpoint(&mut self, address: usize) -> Result<()>
[src]
Remove a breakpoint.
If breakpoint does not exists, do nothing.
pub fn cont(&mut self, how: ContinueMode) -> Result<()>
[src]
Continue debugee, see cont_aux
for details.
pub fn step(&mut self, how: ContinueMode) -> Result<()>
[src]
Singlestep debugee, see cont_aux
for details.
pub fn syscall(&mut self, how: ContinueMode) -> Result<()>
[src]
Run until syscall, see cont_aux
for details.
pub fn detach(&self, signal: Option<Signal>) -> Result<()>
[src]
Detach from debugee.
All breakpoints are removed before detach.
pub fn pid(&self) -> Pid
[src]
Return the debugee pid.
pub fn registers(&self) -> &PtraceRegisters
[src]
Return the latest register state.
pub fn threads(&self) -> &HashMap<Pid, ThreadState>
[src]
Return the debugee threads.
pub fn event(&self) -> &WaitStatus
[src]
Return the latest event.
pub fn breakpoints(&self) -> &HashMap<AddressType, Breakpoint>
[src]
Return all breakpoints.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ptracer
impl !Send for Ptracer
impl !Sync for Ptracer
impl Unpin for Ptracer
impl UnwindSafe for Ptracer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,