Missing tests for persisting the debug server after detaching
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
It would be great if there was an option (perhaps called --persist) which would enable rr to remain running after the gdb client detaches. This would be very handy when debugging an application where the bug appears a long time into the execution of the application, so we can keep rr running the whole time, with the debugged application being held frozen at the interesting event. When starting the next debug session, we could immediately start debugging by just connecting to the already running server, without having to wait for execution to reach the bug event.
For example:
# this takes a long time
$ rr replay --dbgport 50505 -g 600000 --persist
# after the bug event has been reached, open gdb:
$ gdb application_image
# assume that the rr gdbinit has been sourced
(rr) target extended-remote :50505
# ...do debugging...
# rr server currently quits when doing this!
(rr) detach
(rr) quit
# the debug server and the debugged application are still
# working, so we can run gdb again, and we continue where
# we left off in the last debugging session, without having
# to wait again for execution to reach the event 600 000
$ gdb application_image
(rr) target extended-remote :50505
# ...do some more debugging...
(rr) detach
(rr) quit
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
No files or tests are named. Start by tracing the rr replay --dbgport flow and the GDB detach handling; the change is complete when an optional --persist mode keeps the server and debugged application available after detach and a later GDB session can reconnect at the same event.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100