Lines Matching refs:pid

193     pid: Pid,
199 libc::ptrace(request as RequestType, libc::pid_t::from(pid), addr, data)
218 pub fn getregs(pid: Pid) -> Result<user_regs_struct> {
219 ptrace_get_data::<user_regs_struct>(Request::PTRACE_GETREGS, pid)
233 pub fn setregs(pid: Pid, regs: user_regs_struct) -> Result<()> {
237 libc::pid_t::from(pid),
249 fn ptrace_get_data<T>(request: Request, pid: Pid) -> Result<T> {
254 libc::pid_t::from(pid),
265 pid: Pid,
271 libc::pid_t::from(pid),
279 pub fn setoptions(pid: Pid, options: Options) -> Result<()> {
283 libc::pid_t::from(pid),
292 pub fn getevent(pid: Pid) -> Result<c_long> {
293 ptrace_get_data::<c_long>(Request::PTRACE_GETEVENTMSG, pid)
297 pub fn getsiginfo(pid: Pid) -> Result<siginfo_t> {
298 ptrace_get_data::<siginfo_t>(Request::PTRACE_GETSIGINFO, pid)
302 pub fn setsiginfo(pid: Pid, sig: &siginfo_t) -> Result<()> {
307 libc::pid_t::from(pid),
338 pub fn syscall<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
344 ptrace_other(Request::PTRACE_SYSCALL, pid, ptr::null_mut(), data)
359 pub fn sysemu<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
365 ptrace_other(Request::PTRACE_SYSEMU, pid, ptr::null_mut(), data)
373 /// Attaches to the process specified by `pid`, making it a tracee of the calling process.
374 pub fn attach(pid: Pid) -> Result<()> {
378 pid,
388 /// Attaches to the process specified in pid, making it a tracee of the calling process.
391 pub fn seize(pid: Pid, options: Options) -> Result<()> {
395 pid,
405 /// Detaches from the process specified by `pid` allowing it to run freely, optionally delivering a
407 pub fn detach<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
413 ptrace_other(Request::PTRACE_DETACH, pid, ptr::null_mut(), data)
420 /// Continues the execution of the process with PID `pid`, optionally
422 pub fn cont<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
428 ptrace_other(Request::PTRACE_CONT, pid, ptr::null_mut(), data).map(drop)
438 pub fn interrupt(pid: Pid) -> Result<()> {
442 pid,
453 pub fn kill(pid: Pid) -> Result<()> {
457 pid,
468 /// Advances the execution of the process with PID `pid` by a single step optionally delivering a
482 /// Ok(WaitStatus::Stopped(pid, Signal::SIGUSR1)) => {
483 /// let _ = step(pid, Signal::SIGUSR1);
488 pub fn step<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
494 ptrace_other(Request::PTRACE_SINGLESTEP, pid, ptr::null_mut(), data)
510 pub fn sysemu_step<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
518 pid,
527 pub fn read(pid: Pid, addr: AddressType) -> Result<c_long> {
528 ptrace_peek(Request::PTRACE_PEEKDATA, pid, addr, ptr::null_mut())
538 pid: Pid,
542 ptrace_other(Request::PTRACE_POKEDATA, pid, addr, data).map(drop)
547 pub fn read_user(pid: Pid, offset: AddressType) -> Result<c_long> {
548 ptrace_peek(Request::PTRACE_PEEKUSER, pid, offset, ptr::null_mut())
559 pid: Pid,
563 ptrace_other(Request::PTRACE_POKEUSER, pid, offset, data).map(drop)