| 1 | # Pete |
| 2 | |
| 3 | A friendly wrapper around the Linux `ptrace(2)` syscall. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | The current minimum supported OS and compiler versions are: |
| 8 | |
| 9 | - Linux 4.8 |
| 10 | - rustc 1.64 |
| 11 | |
| 12 | Due to test library requirements, the oldest _tested_ Rust version is 1.76. |
| 13 | |
| 14 | Continuous testing is only run for `x86_64-unknown-linux-gnu`. |
| 15 | |
| 16 | Support for earlier Linux versions is possible, but low priority. Eventually, we would |
| 17 | like to support any platform that provides `ptrace(2)`. |
| 18 | |
| 19 | ## Summary |
| 20 | |
| 21 | The `ptrace(2)` interface entails interpreting a series of `wait(2)` statuses. The context used to |
| 22 | interpret a status includes the attach options set on each tracee, previously-seen stops, recent |
| 23 | ptrace requests, and in some cases, extra event data that must be queried using additional ptrace |
| 24 | calls. |
| 25 | |
| 26 | Pete is meant to instead permit reasoning directly about ptrace-stops, as described in the manual. |
| 27 | We hide the lowest-level contextual bookkeeping required to disambiguate ptrace-stops. Whenever we |
| 28 | can, we avoid extraneous ptrace calls, deferring to downstream tracers implemented on top of the |
| 29 | library. For example, Pete can distinguish a syscall-enter-stop and syscall-exit-stop, but does not |
| 30 | _automatically_ query register state to identify the specific syscall. |
| 31 | |
| 32 | ## License |
| 33 | |
| 34 | Pete is licensed under the [ISC License](./LICENSE). |
| 35 | |
| 36 | ## Contributing |
| 37 | |
| 38 | Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in |
| 39 | `pete` by you, shall be licensed as ISC, without any additional terms or conditions. |