Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -38% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -23% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 18% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 8% | 0% |
rr provides deterministic record-replay debugging with full reverse execution capabilities.
rr record <program> [args]rr replay (enters gdb interface with reverse execution)All standard gdb commands work, plus reverse variants:
reverse-next / rn: Step back over function callsreverse-step / rs: Step back into functionsreverse-continue / rc: Continue backward to previous breakpointreverse-stepi / rsi: Step back one instructionreverse-nexti / rni: Step back over one instructionAfter rr record <crashing-program>:
bashrr 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 ...
After rr record <asan-program>:
bashrr 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 ...
Standard gdb commands work at any point:
print <var>: Print variable valueprint *<ptr>: Dereference pointerx/<format> <address>: Examine memoryx/10xb <addr>: 10 bytes in hexx/s <addr>: String at addressinfo locals: Show local variablesinfo args: Show function argumentslist: Show source code around current locationdisassemble: Show assembly around current locationlayout src: TUI source viewlayout asm: TUI assembly viewset disassemble-next-line on: Show assembly with each stepUse scripts/crash_trace.py to automatically extract execution trace before crash.
Other measured skills in the registry, with their headline benchmark lift.