Developer Tools · Cluster
Debuggers
Breakpoints, unwinding, and remote targets.
- 01 Software Breakpoints: Replacing an Instruction with a Trap Byte How a debugger turns a source line into a one-byte code patch, why the program counter has to be rewound, and what the patch cannot do in shared or generated code.
- 02 Hardware Breakpoints and Watchpoints in the Debug Registers Four address slots, a length encoding with alignment rules, and a trap that fires after the store: what the processor can observe without editing code.
- 03 DWARF Line Tables: Turning an Address into a File and Line The line table is a bytecode program that expands into address ranges, not a list of instructions. How debuggers run it, and why a breakpoint on line 12 lands where it does.
- 04 Stack Unwinding: Rebuilding the Call Stack from Frame Rules Why a backtrace cannot be read off the stack directly, how call frame information describes each prologue, and where unwinding gives up on corrupted or signal frames.
- 05 ptrace and the Stop-Notify Model Behind a Debugger Attaching is a signal, every stop must be answered, and the same SIGTRAP means different things. How a tracer distinguishes the events it receives.
- 06 Single-Stepping: One Flags Bit and Its Cost per Instruction The trap flag makes the processor raise an exception after every instruction. How debuggers use it, why stepping over a call needs a breakpoint instead, and where it does not exist.
- 07 Conditional Breakpoints: Where the Test Runs and What It Costs A condition does not reduce the number of stops, only the number of visible ones. Evaluating it in the debugger, in the stub, or in compiled code changes the cost by orders of magnitude.
- 08 The GDB Remote Serial Protocol: Packets, Checksums, and Stubs A debugger talking to a target it cannot link against needs a wire format. How RSP frames commands, negotiates capabilities, and survives a serial line.
- 09 Debugging Optimised Code: Location Lists and Inlined Frames A variable at -O2 is a rule that changes with the program counter, and an inlined call is a frame that exists only in the debug information. Where both come from.
- 10 Core Dumps: Notes, Mappings, and Unwinding a Dead Process A core file is an ELF object whose segments are memory rather than code. How registers, mappings, and file identities are recorded so a backtrace can be rebuilt later.