Expand description
A friendly wrapper around the Linux ptrace(2)
system call.
The ptrace(2)
interface entails interpreting a series of wait(2)
statuses. The context used
to interpret a status includes the attach options set on each tracee, previously-seen stops,
recent ptrace
requests, and in some cases, extra event data that must be queried using
additional ptrace
calls.
Pete is meant to instead permit reasoning directly about ptrace-stops, as described in the manual. We hide the lowest-level contextual bookkeeping required to disambiguate ptrace-stops. Whenever we can, we avoid extraneous ptrace calls, deferring to downstream tracers implemented on top of the library. For example, Pete can distinguish a syscall-enter-stop and syscall-exit-stop, but does not automatically query register state to identify the specific syscall.
Modules§
- error
- Custom types for tracing errors.
- ptracer
- Types for attaching to processes, managing tracees, and interpreting tracing events.
- x86
Structs§
- Pid
- Process identifier
- Ptracer
- Tracer for a Linux process.
- Tracee
- Tracee task in ptrace-stop, with an optional pending signal.
Enums§
- Error
- A tracing error.
- Restart
- Restart requests, which resume stopped tracees.
- Signal
- POSIX signal. Types of operating system signals
- Stop
- A ptrace-stop, a tracee state in which it is stopped and ready to accept ptrace commands.