Modern Linux C++ debugging tools - under the covers
summary
Explains how Linux debuggers use ptrace stops via signals and breakpoints patched with int3, how DWARF (use -g3 for macros) and CFI/CFA map optimized code back to source, how sanitizers and Valgrind use shadow memory and red zones (AddressSanitizer costs ~50–100% slowdown, Valgrind is much slower), and how record‑and‑replay (rr using retired‑branch counters; Live Recorder using binary translation) captures non‑determinism — rr misses AMD/cloud cases. Demos reproduce a cache corruption by reversible debugging and show a Coverity custom checker; Coverity historically found hundreds of Linux kernel defects (e.g., 968 dead‑code fixes).
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:01Debugging philosophies
- 5:47GDB and signal handling
- 11:57Ptrace operations
- 18:26DWARF debug info
- 25:58Unwinding and catchpoints
- 30:14Dynamic analysis tools
- 33:34Record and replay debugging
- 42:07Static analysis with Coverity
- 50:57Custom checker demo
related talks
01h 29mModern Linux C++ Debugging Tools - Under the Covers
20mHow Debuggers Work
01h 26mBoost your C/C++ Developer's Debugging Powers with GDB
31mRace Conditions - Practical Tools & Techniques for Testing, Preventing, and Debugging C++/C Code
44mA Guide to Debugging C++ Code: Practical and Interactive Examples
57mLessons from 20 years of Debugging C++ Code
42mTime Travel Debugging - It’s Time to Debug Different
57mC++ MythBusters Strike 2
