ptrace_syscalls/lib.rs
1pub use nix::sys::ptrace::AddressType;
2pub use nix::unistd::Pid;
3
4mod arch;
5mod group;
6mod inspect;
7mod syscalls;
8pub mod types;
9
10pub use group::*;
11pub use inspect::*;
12pub use syscalls::*;
13
14pub trait SyscallNumber {
15 fn syscall_number(&self) -> isize;
16}
17
18/// Get the raw arguments of a syscall on syscall-enter stop.
19///
20/// Calling this function elsewhere will result in incorrect results or errors.
21pub fn get_raw_args(pid: Pid) -> Result<SyscallRawArgs, nix::Error> {
22 SyscallRawArgs::get_on_sysenter(pid)
23}