Vector35 / Vector35/debugger

GDB MI adapter: support rr timestamp navigation and bookmarking

Open
#1,025 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement GDB Adapter Impact: Medium TTD UI
Dominant language
C++
Stars
331
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Summary

When using the GDB MI adapter with rr (record and replay debugger), it would be useful to support:

  1. Displaying the current timestamp — rr exposes the current event number via the when command, which prints the current FrameTime (a monotonically increasing event sequence number). This could be shown in the UI so the user always knows where they are in the trace.

  2. 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.

  3. Bookmarking timestamps — rr has a checkpoint/restart system 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 qRRCmd packets 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the GDB MI adapter and trace how debugger commands and status information reach the UI. Review rr's when, run <event_number>, checkpoint, restart, delete checkpoint, and info checkpoints behavior, including qRRCmd packets. Done means the UI displays the event number, supports event navigation, and provides checkpoint creation, listing, jumping, and deletion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, reverse-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.