Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 1.23 KB

README.md

File metadata and controls

28 lines (24 loc) · 1.23 KB

PTRACE-debugger

A custom debugger for linux based operating systems built using ptrace syscall.

How to run

Compile the source code

g++ debugger.cpp -o debugger

Execute the debugger with the path to binary file to debug

./debugger path/to/binary_file

Commands in the debugger

Command Description
next/ nexti To step to next instruction
break 0x123456 To set a break point at 0x123456
continue / c To continue the execution, even c can be used
exit To exit the program
infobreak/ i b List of break points
info registers/ i r List of registers with their values

Resources

  1. Playing with Ptrace
  2. Liz Rice's talk on debuggers from scratch part 1, part 2
  3. Reading registers of a traced process