What Really Happens When You Hit a Breakpoint
summary
Explains concrete debugger mechanics on Linux: using ptrace syscalls to read memory and registers, replacing a byte with INT3 (0xCC) for software breakpoints, and using the four hardware debug registers (DR0–DR3 + DR7) for watchpoints that break on reads/writes. Covers DWARF line and call-frame data for mapping source to addresses and unwinding, single‑stepping to restore and reinsert breakpoints, and using the System V ABI and mangled names to fabricate in‑process C++ function calls.
AI-written summary · about
chapters (13)
- 0:00Intro
- 0:46What kind of debuggers?
- 1:16Agenda
- 1:46Debug scenario architecture
- 3:22Manipulating memory
- 6:09Breakpoints
- 14:38Watchpoints
- 17:13Stepping
- 21:08Stack unwinding
- 29:39Reading a variable
- 35:12Calling a function
- 41:02Summary
- 41:24Outro
related talks
15mGive me 15 minutes & I'll change your view of GDB
05mDebugging - A dive into Breakpoints
52mGetting the Most Out of GDB
01h 02mTime Travel Debugging
46mThe Hidden Secrets of Debugging
01h 01mBack to Basics: Debugging in Cpp
59m“GDB - A Lot More Than You Knew"
46mUsing LLDB, Instruments, and Xcode to understand a codebase
