Skillshub rr-debugger
Deterministic debugging with rr record-replay. Use when debugging crashes, ASAN faults, or when reverse execution is needed. Provides reverse-next, reverse-step, reverse-continue commands and crash trace extraction.
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/gadievron/raptor/rr-debugger" ~/.claude/skills/comeonoliver-skillshub-rr-debugger && rm -rf "$T"
manifest:
skills/gadievron/raptor/rr-debugger/SKILL.mdsource content
rr Deterministic Debugger
rr provides deterministic record-replay debugging with full reverse execution capabilities.
Core Workflow
- Record:
rr record <program> [args] - Replay:
(enters gdb interface with reverse execution)rr replay
Reverse Execution Commands
All standard gdb commands work, plus reverse variants:
/reverse-next
: Step back over function callsrn
/reverse-step
: Step back into functionsrs
/reverse-continue
: Continue backward to previous breakpointrc
/reverse-stepi
: Step back one instructionrsi
/reverse-nexti
: Step back over one instructionrni
Crash Trace Extraction
Regular Crashes
After
rr record <crashing-program>:
rr replay # In gdb: reverse-next 100 # Go back 100 steps (adjust N as needed) # Now step forward to see execution leading to crash: next next ...
ASAN Crashes
After
rr record <asan-program>:
rr replay # In gdb: bt # View stack trace up # Issue "up" commands until last app frame (before ASAN runtime) break *$pc # Set breakpoint at that location reverse-continue # Go back to last app instruction before ASAN # Now step forward to see execution leading to fault: next next ...
Inspecting Variables and Memory
Standard gdb commands work at any point:
: Print variable valueprint <var>
: Dereference pointerprint *<ptr>
: Examine memoryx/<format> <address>
: 10 bytes in hexx/10xb <addr>
: String at addressx/s <addr>
: Show local variablesinfo locals
: Show function argumentsinfo args
Source vs Assembly View
: Show source code around current locationlist
: Show assembly around current locationdisassemble
: TUI source viewlayout src
: TUI assembly viewlayout asm
: Show assembly with each stepset disassemble-next-line on
Automation Script
Use
scripts/crash_trace.py to automatically extract execution trace before crash.