It can further be used as a sandbox[1][2] and as a run-time environment simulator (like emulating root access for non-root software[2][3]).
By attaching to another process using the ptrace call, a tool has extensive control over the operation of its target.
[vague][citation needed] ptrace only provides the most basic interface necessary to support debuggers and similar tools.
Programs using it must have intimate knowledge of the specifics of the OS and architecture, including stack layout, application binary interface, system call mechanism, name mangling, the format of any debug data, and are responsible for understanding and disassembling machine code themselves.
[5] ptrace is available as a system call on IRIX,[10] IBM AIX,[11] NetBSD,[12] FreeBSD,[13] OpenBSD,[14] and Linux.
[16] HP-UX supported ptrace until release 11i v3 (it was deprecated in favour of ttrace, a similar OS-specific call, in 11i v1).
[18] Apple uses this feature to limit the use of debuggers on programs that manipulate DRM-ed content, including iTunes.
[20] Debuggers on OS X typically use a combination of ptrace and the Mach VM and thread APIs.