tracetree
tracetree copied to clipboard
Add macOS support
It would be great to have macOS support. ptrace doesn't have the same options there, but I finally found the necessary APIs that should enable this.
Specifically, calling dispatch_source_create with DISPATCH_SOURCE_TYPE_PROC will provide events on fork/exec/exit, which should be sufficient for this tool's needs. Apple has some sample code, and there's also the LLDB source to look at, where I originally stumbled upon this.