karellen-rr-mcp
v0.3.1MCP Server for rr Reverse Debugging
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
rr_record
Record a command with rr. Returns trace directory path. Args: command: Command and arguments to record (e.g. ["./my_test"]). working_directory: Working directory for the recorded process. env: Optional extra environment variables for the recorded process. trace_dir: Output trace directory. If omitted, rr uses its default (~/.local/share/rr/).
| Parameter | Type | Description |
|---|---|---|
command * | array | |
env | object | |
trace_dir | string | |
working_directory | string |
rr_replay_start
Start a replay session. Launches rr gdbserver and connects GDB/MI. Args: trace_dir: Path to rr trace directory. If omitted, uses the latest trace. pid: PID of a specific subprocess to replay. Use rr_ps to list available processes.
| Parameter | Type | Description |
|---|---|---|
pid | integer | |
trace_dir | string |
rr_replay_stop
Stop the current replay session and clean up.
rr_list_recordings
List available rr trace recordings. Args: trace_base_dir: Base directory for traces. Defaults to ~/.local/share/rr.
| Parameter | Type | Description |
|---|---|---|
trace_base_dir | string |
rr_ps
List processes in an rr trace recording. Args: trace_dir: Path to rr trace directory.
| Parameter | Type | Description |
|---|---|---|
trace_dir * | string |
rr_traceinfo
Get trace metadata (header info in JSON format). Args: trace_dir: Path to rr trace directory.
| Parameter | Type | Description |
|---|---|---|
trace_dir * | string |
rr_rm
Remove an rr trace recording. Args: trace_dir: Path to rr trace directory to remove.
| Parameter | Type | Description |
|---|---|---|
trace_dir * | string |
rr_when
Get the current rr event number. Useful for knowing your position in the trace.
rr_breakpoint_set
Set a breakpoint at a function, file:line, or address. Args: location: Breakpoint location (e.g. "main", "foo.c:42", "*0x400500"). condition: Optional condition expression (e.g. "i > 10"). temporary: If true, breakpoint is deleted after first hit.
| Parameter | Type | Description |
|---|---|---|
location * | string | |
condition | string | |
temporary | boolean |
rr_breakpoint_remove
Remove a breakpoint by its number. Args: breakpoint_number: The breakpoint number to remove.
| Parameter | Type | Description |
|---|---|---|
breakpoint_number * | integer |
rr_breakpoint_list
List all breakpoints.
rr_watchpoint_set
Set a hardware watchpoint on a variable or expression. Args: expression: Expression to watch (e.g. "my_var", "*0x601050"). access_type: One of "write", "read", or "access".
| Parameter | Type | Description |
|---|---|---|
expression * | string | |
access_type | string |
rr_continue
Continue execution forward or backward until breakpoint/signal/end. Args: reverse: If true, continue backward (reverse execution).
| Parameter | Type | Description |
|---|---|---|
reverse | boolean |
rr_step
Step into (source-level) forward or reverse. Args: count: Number of steps (forward only). reverse: If true, step backward.
| Parameter | Type | Description |
|---|---|---|
count | integer | |
reverse | boolean |
rr_next
Step over (source-level) forward or reverse. Args: count: Number of steps (forward only). reverse: If true, step backward.
| Parameter | Type | Description |
|---|---|---|
count | integer | |
reverse | boolean |
rr_finish
Run to function return (or to call site if reverse). Args: reverse: If true, run backward to the call site.
| Parameter | Type | Description |
|---|---|---|
reverse | boolean |
rr_run_to_event
Jump to a specific rr event number. Args: event_number: The rr event number to seek to.
| Parameter | Type | Description |
|---|---|---|
event_number * | integer |
rr_thread_list
List all threads in the replayed process with their current state and location.
rr_thread_select
Switch to a different thread. Args: thread_id: Thread ID to switch to (from rr_thread_list).
| Parameter | Type | Description |
|---|---|---|
thread_id * | string |
rr_select_frame
Select a stack frame for inspection. After selecting, rr_locals and rr_evaluate operate in the selected frame's context. Args: frame_level: Frame number from rr_backtrace (0 = innermost/current).
| Parameter | Type | Description |
|---|---|---|
frame_level * | integer |
rr_backtrace
Get the call stack (backtrace). Args: max_depth: Maximum number of frames to return.
| Parameter | Type | Description |
|---|---|---|
max_depth | integer |
rr_evaluate
Evaluate a C/C++ expression in the current context. Args: expression: Expression to evaluate (e.g. "x + 1", "sizeof(struct foo)").
| Parameter | Type | Description |
|---|---|---|
expression * | string |
rr_locals
List local variables with their current values.
rr_read_memory
Read raw memory bytes at an address. Args: address: Memory address to read (e.g. "0x7ffd1234"). count: Number of bytes to read (default 64).
| Parameter | Type | Description |
|---|---|---|
address * | string | |
count | integer |
rr_registers
Read CPU registers. Args: register_names: Specific register names to read. If omitted, reads all.
| Parameter | Type | Description |
|---|---|---|
register_names | array |
rr_source_lines
List source code around current position or a specific location. Args: file: Source file path. If omitted, uses current position. line: Line number. If omitted, uses current position. count: Number of lines to show (default 10).
| Parameter | Type | Description |
|---|---|---|
count | integer | |
file | string | |
line | integer |
rr_checkpoint_save
Save a checkpoint at the current position. Returns checkpoint info.
rr_checkpoint_restore
Restore to a previously saved checkpoint. Args: checkpoint_id: The checkpoint ID to restore.
| Parameter | Type | Description |
|---|---|---|
checkpoint_id * | integer |