A debugger is one of those pieces of software that most, if not every, developer uses at least once during their software engineering career, but how many of you know how they actually work? During my talk at linux.conf.au 2018 in Sydney, I will be talking about writing a debugger from scratch… in Rust!
In this article, the terms debugger/tracer are interchangeably. “Tracee” refers to the process being traced by the tracer.
The ptrace system call
Most debuggers heavily rely on a system call known as ptrace(2)
, which has the prototype:
long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data);
Read more at OpenSource.com