How C++ Debuggers work
summary
Explains how debuggers actually work on x86 Linux: parses ELF and DWARF to map source to addresses, sets software breakpoints by writing 0xCC into the instruction stream and restoring the byte on continue, uses ptrace and process_vm_readv for registers and memory, implements stepping by single-step or by setting return-address breakpoints, exposes a GDB remote text packet protocol, notes four hardware debug registers limit and shows a working Linux-debugger-from-scratch blog series.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 4:00Architecture
- 7:55Brief overview
- 9:07Software breakpoints
- 16:40Mapping
- 17:47Stepping
- 22:37Second Winding
- 24:47Expression Evaluation
- 29:15PTrace
- 30:30Breakpoints
- 33:19Remote Debugging
- 35:32Debug Packets
- 39:41Reversible Debugging
related talks
01h 16mSegment 4
24mBaremetal Software ❤ FOSS
20mBridge X86-64 Applications To ARM64 and RISC-V With Dynamic Binary Translation
42mThe Big-endian RISC-V Linux Adventure
54mCombat complexity - build your own open OS and hardware
19mLinuxKI on POWER: The kernel Performance Toolkit Porting Experience and Challenges
35mFixing the Watchdog: How Open Documentation Empowers Community-Driven Hardware Support
43mGetting to Know the Linux Kernel: A Beginner's Guide
