Support rewinding to event in the same process, or via breakpoints
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
Currently, the run [event_number] command terminates the existing process, and spawns a new one. Some IDE gdb-based debuggers (e.g.: CLion) detect this and immediately detach, which causes the rr server to shut down (see also #1990). This is unfortunate if reaching the bug event takes a long time, so we would like to avoid shutting down the rr server.
A workaround for this would be either to introduce a version of the run command which rewinds inside the existing process, or, to quote @rocallahan, to do this by setting an event-based breakpoint:
I think the right solution here might be a special rr command to go to
a specific event number by issuing a special command that sets a
breakpoint at that event number and then continuing in the correct
direction. I don't think that would be very hard to do at this point,
at least if you don't mind stopping if a regular breakpoint/watchpoint
is hit along the way, and you stay in the same process.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the implementation of the run [event_number] command and trace how it terminates the existing process and spawns a new one. Compare the two proposed approaches: rewinding in the same process or setting an event-based breakpoint and continuing in the correct direction. Done means reaching the requested event without shutting down the rr server or causing the debugger to detach.
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
- 25/100