-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Summary
When using the GDB MI adapter with rr (record and replay debugger), it would be useful to support:
-
Displaying the current timestamp — rr exposes the current event number via the
whencommand, which prints the currentFrameTime(a monotonically increasing event sequence number). This could be shown in the UI so the user always knows where they are in the trace. -
Navigating to a given timestamp — rr supports seeking to an event number via
run <event_number>(e.g.,run 12345). Under the hood, this finds the nearest checkpoint and replays forward, so it's fast — not a full replay from the start. This enables direct time travel to any point in the recorded execution. -
Bookmarking timestamps — rr has a
checkpoint/restartsystem that lets users save and restore positions in the trace:checkpoint— saves the current position by deep-forking (cloning) the entire replay session. Returns an integer ID, e.g.,Checkpoint 3 at main.cc:42.restart <id>— seeks to a previously saved checkpoint by restoring the cloned session. e.g.,restart 3.delete checkpoint <id>— removes a saved checkpoint.info checkpoints— lists all checkpoints with their ID, event time, and source location.
These are rr-specific GDB extension commands (sent via
qRRCmdpackets over the GDB remote protocol), not built-in GDB commands.
rr command reference
| Command | Description |
|---|---|
when |
Print current event number (FrameTime) |
run <N> |
Seek to event number N |
checkpoint |
Save current position, returns an ID |
restart <id> |
Restore to checkpoint by ID |
delete checkpoint <id> |
Remove a checkpoint |
info checkpoints |
List all checkpoints (ID, event time, location) |
Suggested UI
- Show current event number (from
when) in the debugger status bar or toolbar - Provide a "Go to event" input for direct navigation
- A bookmarks panel listing saved checkpoints, with ability to create/delete/jump to them