Debugger
A debugger is a program used to debug a target program. Debuggers aim to visualize data and clarify control flow. They are a common tool in software development.
Debugging facilities include
- ability to halt the program at specified breakpoints
- display the contents of memory, CPU registers or storage devices
- modify memory or register contents
- offer an assembly display
Debuggers on Linux are implemented using the ptrace
systemcall.
List of debuggers
- RemedyBG: a 64-bit Windows debugger for C/C++
- rr: C/C++ debugging tool for Linux, aiming to be a replacement for gdb
- Visual Studio: Windows IDE with integrated debugger
- raddebugger: A graphical Windows debugger for x64
Debugger APIs
- GDB/MI Interface
- remedybgdriver.h
- VS debug adapter protocol
Debug Events
A debugger is attached to a debuggee's process, meaning it receives debug information about it at runtime from the OS. The information comes in the form of debug events and can include:
- When a process/thread/module is created or loaded
- When a thread is named
- When a thread encounters an exception ("trap", memory violation) and where
- When a thread logs a debug string
- When a process/thread/module exits or unloads