ptrace requests
The ptrace
system call has a libc
wrapper like any other system call, so you may include ptrace.h
and simply call ptrace
while passing it a request and a process ID. The following details are not a replacement for the main pages of ptrace(2)
, although some descriptions were borrowed from the main pages.
Here's the synopsis:
#include <sys/ptrace.h> long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data);
ptrace request types
Here is a list of requests that are most commonly used when using ptrace
to interact with a process image:
Request |
Description |
---|---|
|
Attach to the process specified in |
Get Learning Linux Binary Analysis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.