RR

Enables reverse execution and deterministic debugging for C/C++ applications to diagnose crashes.

Install

mkdir -p .claude/skills/rr-debugger && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3102" && unzip -o skill.zip -d .claude/skills/rr-debugger && rm skill.zip

Installs to .claude/skills/rr-debugger

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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.
215 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Record program execution deterministically
  • Replay execution with full reverse-stepping capabilities
  • Step back over function calls or into functions
  • Continue backward to previous breakpoints
  • Extract execution traces before crashes
  • Inspect variables and memory at any point during replay

How it works

The debugger records program execution and allows replaying it with reverse execution commands, enabling inspection of states and tracing crashes.

Inputs & outputs

You give it
program execution
You get back
deterministic replay with reverse execution and crash traces

When to use rr-debugger

  • Debug application crashes
  • Reverse step through failed code paths
  • Trace ASAN memory faults
  • Inspect variable states during replay

About this skill

rr Deterministic Debugger

rr provides deterministic record-replay debugging with full reverse execution capabilities.

Core Workflow

  1. Record: rr record <program> [args]
  2. Replay: rr replay (enters gdb interface with reverse execution)

Reverse Execution Commands

All standard gdb commands work, plus reverse variants:

  • reverse-next / rn: Step back over function calls
  • reverse-step / rs: Step back into functions
  • reverse-continue / rc: Continue backward to previous breakpoint
  • reverse-stepi / rsi: Step back one instruction
  • reverse-nexti / rni: Step back over one instruction

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 <var>: Print variable value
  • print *<ptr>: Dereference pointer
  • x/<format> <address>: Examine memory
    • x/10xb <addr>: 10 bytes in hex
    • x/s <addr>: String at address
  • info locals: Show local variables
  • info args: Show function arguments

Source vs Assembly View

  • list: Show source code around current location
  • disassemble: Show assembly around current location
  • layout src: TUI source view
  • layout asm: TUI assembly view
  • set disassemble-next-line on: Show assembly with each step

Automation Script

Use scripts/crash_trace.py to automatically extract execution trace before crash.

How it compares

This debugger offers deterministic record-replay and reverse execution, which is not available in standard forward-only debuggers.

Compared to similar skills

rr-debugger side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
rr-debugger (this skill)13moReviewAdvanced
static-analysis56moNo flagsAdvanced
c-pro14moNo flagsAdvanced
quality-checker03moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry