-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlib.rs
34 lines (27 loc) · 1.22 KB
/
lib.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! 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](ptracer::Stop). 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.
#[macro_use]
pub mod error;
pub mod ptracer;
#[cfg(target_arch = "aarch64")]
pub mod aarch64;
#[cfg(target_arch = "x86_64")]
pub mod x86;
#[doc(inline)]
pub use error::Error;
#[doc(inline)]
pub use ptracer::{Pid, Ptracer, Restart, Siginfo, Signal, Stop, Tracee};
#[cfg(target_arch = "x86_64")]
#[doc(inline)]
pub use ptracer::Registers;