Agent Skillsgadievron/raptor › rr-debugger

rr-debugger

GitHub

基于 rr 记录重放的确定性调试工具,支持反向执行以排查崩溃和 ASAN 故障。提供反向单步、继续及崩溃前执行轨迹提取功能,辅助深入分析程序异常原因。

.claude/skills/crash-analysis/rr-debugger/SKILL.md gadievron/raptor

Trigger Scenarios

调试程序崩溃 分析 ASAN 内存错误 需要反向执行回溯问题根源

Install

npx skills add gadievron/raptor --skill rr-debugger -g -y
More Options

Non-standard path

npx skills add https://github.com/gadievron/raptor/tree/main/.claude/skills/crash-analysis/rr-debugger -g -y

Use without installing

npx skills use gadievron/raptor@rr-debugger

指定 Agent (Claude Code)

npx skills add gadievron/raptor --skill rr-debugger -a claude-code -g -y

安装 repo 全部 skill

npx skills add gadievron/raptor --all -g -y

预览 repo 内 skill

npx skills add gadievron/raptor --list

SKILL.md

Frontmatter
{
    "name": "rr-debugger",
    "description": "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.",
    "user-invocable": false
}

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.

Version History

  • 91a9686 Current 2026-07-24 22:16

Same Skill Collection

.claude/skills/audit/SKILL.md
.claude/skills/code-understanding/SKILL.md
.claude/skills/crash-analysis/function-tracing/SKILL.md
.claude/skills/crash-analysis/gcov-coverage/SKILL.md
.claude/skills/crash-analysis/line-execution-checker/SKILL.md
.claude/skills/exploitability-validation/SKILL.md
.claude/skills/frida/SKILL.md
.claude/skills/oss-forensics/github-archive/SKILL.md
.claude/skills/oss-forensics/github-commit-recovery/SKILL.md
.claude/skills/oss-forensics/github-evidence-kit/SKILL.md
.claude/skills/oss-forensics/github-wayback-recovery/SKILL.md
.claude/skills/oss-forensics/orchestration/SKILL.md

Metadata

Files
0
Version
e57ffe8
Hash
318e0c80
Indexed
2026-07-24 22:16

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 12:28
浙ICP备14020137号-1 $Гость$