rr icon indicating copy to clipboard operation
rr copied to clipboard

Support hopping between recorded processes

Open mikeconley opened this issue 8 years ago • 3 comments

I debug multi-process Firefox with rr all of the time, and it's absolutely great.

One thing I wish I could do is choose and switch which process I was "inside" while debugging.

For example, suppose I'm debugging the content processes reaction to a particular IPC message. This IPC message is sent frequently, but there's a time when it's sent and the parent is in a particular state where I want to see what the content process does.

It'd be lovely if I could break when I realize I'm in that state in the parent process, and then switch over to the content process and see how it deals with the IPC message.

Currently, I do this with stdio logging, and it's noisy but it gets the job done. I'd prefer rr if I can get it!

mikeconley avatar Oct 11 '17 22:10 mikeconley

From roc in IRC:

one thing you can do is run when in one process and then rr replay -g <nnn> -p <pid> to attach another process at the same point

mikeconley avatar Oct 11 '17 22:10 mikeconley

I looked into this a bit a month or two ago. gcc's multiprocess stuff and gcc's reverse-execution stuff don't really understand each other very well so it's not feasible to do this inside a single gdb instance in the near term.

khuey avatar Oct 13 '17 18:10 khuey

GDB's multiprocess support has improved considerably recently, and I was able to do a reasonable job of multi-process debugging by removing the restrictions in rr that restrict us from reporting the multiple processes. One issue I ran into though was that GDB improperly modeled address space sharing, so I've sent an RFC to the GDB list to discuss possible solutions: https://sourceware.org/pipermail/gdb-patches/2022-August/191187.html.

Keno avatar Aug 03 '22 23:08 Keno