rr-debugger / rr-debugger/rr

Missing tests for persisting the debug server after detaching

Open
#1,990 8 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

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.