rr-debugger / rr-debugger/rr

Implement a 'history' command

Open
#1,624 3 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

Had a quick discussion with @jrmuizel about low hang fruits. We came up with 'history'.

When debugging it's easy to get lost. Say you set a bp and you continue but that breakpoint is not hit and instead you hit an early return. You've lost your state. Breaking at the previous line might get you back to another invocation of that function.

By creating automatic 'anonymous' checkpoint every time we give a (rr) prompt we can implement the following command:

'back': Jump back to the previous state
'forward': Jump forward in history:
'history': show your history, something like this:
Steps Where
-1 MyFunc.c:12
0 MyFunc.c:13
1 MyFunc.c:17
2 Helper.c:1

This should be trivial to implement on top of my PR #1621.

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 reviewing PR #1621 and the code handling each rr prompt. Trace how anonymous checkpoints could support the proposed back, forward, and history commands. Done means showing checkpoint locations and navigating between prior and later states as described.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.