Skip to content

[RFC] Integration with GDB checkpoints/bookmarks #2878

@Bob131

Description

@Bob131

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions