본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md3.4 KB
  • scripts/crash_trace.py8.0 KB
  • scripts/test_crash_trace.py2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

rr Deterministic Debugger

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

Core Workflow

  1. Record: rr record <program> [args]

    Sandbox exemption (documented decision): rr needs ptrace and perf counters, which libexec/raptor-run-sandboxed denies, so recording runs the untrusted binary unsandboxed — behavior observed under earlier sandboxed runs says nothing about what the payload does with this ambient authority. Keep the recorded invocation to exactly the reproduced crash command (never a broader test suite or build), and treat any unexpected network or filesystem activity during recording as a finding in itself. Replay carries no such residual: it re-executes the recorded trace under gdb, not the binary against the host.

  2. Replay: rr replay -- -nx -iex 'set auto-load off' -iex 'set auto-load safe-path /dev/null' (enters gdb interface with reverse execution). The flags after -- go to gdb and disable auto-load with no trusted directory: the recorded binary is untrusted, and a permissive gdb config (e.g. an operator ~/.gdbinit widening auto-load safe-path) would otherwise execute scripts the binary or its build tree plants (.debug_gdb_scripts, *-gdb.py). Same hardening set as scripts/crash_trace.py — use it on EVERY manual replay.

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 -- -nx -iex 'set auto-load off' -iex 'set auto-load safe-path /dev/null'
# 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 -- -nx -iex 'set auto-load off' -iex 'set auto-load safe-path /dev/null'
# 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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

audit

무료

Hypothesis-driven, tool-grounded security review of coverage gaps

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gadievron/raptor3.9천2026년 10월 19일 업데이트

Add gcov code coverage instrumentation to C/C++ projects

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gadievron/raptor3.9천2026년 10월 19일 업데이트

Provides adversarial code comprehension for security research, mapping architecture, tracing data flows, and hunting vulnerability variants to build ground-truth understanding before or alongside static analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gadievron/raptor3.9천2026년 10월 19일 업데이트

Multi-stage pipeline for validating that vulnerability findings are real, reachable, and exploitable, preventing wasted effort on hallucinated findings, dead code paths, or findings with unrealistic preconditions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gadievron/raptor3.9천2026년 10월 19일 업데이트

frida

무료

Dynamic instrumentation via Frida - attach to or spawn a process, load a JS hook script, capture send() events into a lifecycle-managed run directory. Supports local, USB-attached, and remote frida-server targets.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gadievron/raptor3.9천2026년 10월 19일 업데이트

Instrument C/C++ with -finstrument-functions for execution tracing and Perfetto visualisation

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gadievron/raptor3.9천2026년 10월 19일 업데이트

gadievron의 스킬 모두 보기

이 스킬의 문제 신고