gtrace is a library for implementing strace-like behavior, and a reference client that works like strace.
The following sources were very helpful in learning how to do this:
- Nelson Elhage's Write yourself an strace in 70 lines of code
- Joe Kain's Loading and ptrac'ing a process in Rust and related blog posts
- the ptrace(2) man page, in particular the extended description written by Denys Vlasenko