rr-debugger / rr-debugger/rr

[RFC] Integration with GDB checkpoints/bookmarks

Open
#2,878 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

(Split out from #2877)

GDB has varying degrees of support for checkpoints and bookmarks:

  • Checkpoints are currently specific to the linux-nat target and implemented using fork(). The semantics are quite similar to rr checkpoints, being implemented in a similar way. A notable difference, however, is that an inferior exit from the linux-nat target will transparently revert the inferior state to the last checkpoint.
  • Bookmarks are part of GDB's target-generic reverse execution/debugging support. The target is expected to be able to provide an opaque byte buffer representing a particular point of execution that can be revisited at a later point. This seems fit ReplayTimeline marks quite neatly.

What combination of these makes sense for rr? Personally, I quite like keeping checkpoints more-or-less as they are and using lighter-weight rr proto-marks for GDB bookmarks, but I have trouble finding a compelling rationale for having both (beyond my desire to have an interface for proto-marks usable from GDB scripts); any meaning assigned to one relative to the other will probably be rather arbitrary.

Additionally, is fleshing out GDB's support for target-generic (and remote) checkpoints worth much to rr? The main benefits seem to be interface consistency and the potential to shed some hacks from rr, but bookmarks (in some form) may well be better for interface consistency and shedding hacks won't really be an option until there's almost no-one using rr with GDB <11/12/13/whenever.

Contributor guide

Open the contributing guide

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 by comparing the GDB checkpoint and bookmark semantics described here with rr's ReplayTimeline marks and proto-marks. Decide whether rr should expose checkpoints, bookmarks, or both, and document the rationale and interface direction; the issue names no implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
devtools, operating-systems, reverse-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.