Lines Matching refs:ptrace
8 use nix::sys::ptrace;
10 use nix::sys::ptrace::Options;
23 let err = ptrace::attach(getpid()).unwrap_err(); in test_ptrace()
34 let err = ptrace::setoptions(getpid(), Options::PTRACE_O_TRACESYSGOOD) in test_ptrace_setoptions()
44 let err = ptrace::getevent(getpid()).unwrap_err(); in test_ptrace_getevent()
53 if let Err(Errno::EOPNOTSUPP) = ptrace::getsiginfo(getpid()) { in test_ptrace_getsiginfo()
64 if let Err(Errno::EOPNOTSUPP) = ptrace::setsiginfo(getpid(), &siginfo) { in test_ptrace_setsiginfo()
71 use nix::sys::ptrace; in test_ptrace_cont()
87 let err = ptrace::attach(getpid()).unwrap_err(); in test_ptrace_cont()
94 ptrace::traceme().unwrap(); in test_ptrace_cont()
106 ptrace::cont(child, None).unwrap(); in test_ptrace_cont()
111 ptrace::cont(child, Some(Signal::SIGKILL)).unwrap(); in test_ptrace_cont()
121 while ptrace::cont(child, Some(Signal::SIGKILL)).is_ok() { in test_ptrace_cont()
134 use nix::sys::ptrace; in test_ptrace_interrupt()
151 ptrace::seize(child, ptrace::Options::PTRACE_O_TRACESYSGOOD) in test_ptrace_interrupt()
153 ptrace::interrupt(child).unwrap(); in test_ptrace_interrupt()
158 ptrace::syscall(child, None).unwrap(); in test_ptrace_interrupt()
163 ptrace::detach(child, Some(Signal::SIGKILL)).unwrap(); in test_ptrace_interrupt()
169 while ptrace::cont(child, Some(Signal::SIGKILL)).is_ok() { in test_ptrace_interrupt()
187 use nix::sys::ptrace; in test_ptrace_syscall()
201 ptrace::traceme().unwrap(); in test_ptrace_syscall()
218 ptrace::setoptions(child, ptrace::Options::PTRACE_O_TRACESYSGOOD) in test_ptrace_syscall()
223 || ptrace::getregs(child).unwrap().orig_rax as libc::c_long; in test_ptrace_syscall()
227 || ptrace::getregs(child).unwrap().orig_eax as libc::c_long; in test_ptrace_syscall()
238 ptrace::read_user(child, rax_offset as _).unwrap() in test_ptrace_syscall()
243 ptrace::syscall(child, None).unwrap(); in test_ptrace_syscall()
252 ptrace::syscall(child, None).unwrap(); in test_ptrace_syscall()
261 ptrace::syscall(child, None).unwrap(); in test_ptrace_syscall()
268 ptrace::syscall(child, Signal::SIGTERM).unwrap(); in test_ptrace_syscall()