Lines Matching refs:pid
65 pid: Pid,
71 libc::pid_t::from(pid),
91 /// Attaches to the process specified by `pid`, making it a tracee of the calling process.
92 pub fn attach(pid: Pid) -> Result<()> {
94 ptrace_other(Request::PT_ATTACH, pid, ptr::null_mut(), 0).map(drop)
100 /// Detaches from the process specified by `pid` allowing it to run freely, optionally delivering a
102 pub fn detach<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
108 ptrace_other(Request::PT_DETACH, pid, ptr::null_mut(), data).map(drop)
114 /// Continues the execution of the process with PID `pid`, optionally
116 pub fn cont<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
123 ptrace_other(Request::PT_CONTINUE, pid, 1 as AddressType, data)
131 pub fn kill(pid: Pid) -> Result<()> {
133 ptrace_other(Request::PT_KILL, pid, 0 as AddressType, 0).map(drop)
140 /// Advances the execution of the process with PID `pid` by a single step optionally delivering a
153 /// Ok(WaitStatus::Stopped(pid, Signal::SIGUSR1)) => {
154 /// let _ = step(pid, Signal::SIGUSR1);
167 pub fn step<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
173 ptrace_other(Request::PT_STEP, pid, ptr::null_mut(), data).map(drop)
181 pub fn read(pid: Pid, addr: AddressType) -> Result<c_int> {
185 ptrace_other(Request::PT_READ_D, pid, addr, 0)
193 pub fn write(pid: Pid, addr: AddressType, data: c_int) -> Result<()> {
194 unsafe { ptrace_other(Request::PT_WRITE_D, pid, addr, data).map(drop) }