How Debuggers Work
summary
Covers how native debuggers on Linux map DWARF data to running code, read memory with ptrace PEEKDATA returning 64 bits, and set breakpoints either by writing 0xCC INT3 into code or using hardware watchpoints limited to four debug registers on x64. Shows how variable bytes are interpreted from DWARF type info, how a debugger fabricates calls via the platform ABI, and describes dynamic debugging that swaps optimized functions for unoptimized copies to restore stepping and visibility.
AI-written summary · about
chapters (10)
- 0:00Intro
- 0:33What kind of debugger
- 1:10Agenda
- 1:43Debug Scenario Architecture
- 3:33Memory Manipulation
- 4:25Prace
- 6:08Setting a breakpoint
- 13:13Reading a variable
- 15:53Calling a function
- 17:51Debugging optimized code
related talks
01h 29mModern Linux C++ Debugging Tools - Under the Covers
57mModern Linux C++ debugging tools - under the covers
15mGive me 15 minutes & I'll change your view of GDB
01h 26mBoost your C/C++ Developer's Debugging Powers with GDB
01h 27mBecome a GDB Power User
52mGetting the Most Out of GDB
25mLLDB - a new C++ debugger
44mA Guide to Debugging C++ Code: Practical and Interactive Examples
