Debugging child processes, -f versus -p versus -g
tbsaunde at tbsaunde.org
Thu Apr 7 19:57:49 UTC 2016
On Wed, Apr 06, 2016 at 10:09:03AM -0700, Kyle Huey wrote:
> On Wed, Apr 6, 2016 at 9:55 AM, Benjamin Smedberg <benjamin at smedbergs.us>
> I am trying to debug some Firefox plugin tests which have a process
> hierarchy, and I don't quite understand how debugging multiple processes in
> a recording works, and in particular -f and -p.
> First: when you're debugging a replay, do you have access to all the
> processes in one debugging session? Or is it necessary to debug one process
> at a time and then use event-numbers to synchronize? If they are all one
> debugging session, do breakpoints apply to all processes or just one?
> Second: what processes do -p and -f attach to by default? Is the primary
> difference between them that -f <PID> attaches to the "parent" of PID -p
> attaches to the child of PID, but at the same point in time? Or am I
> totally misunderstanding?
> From gdb, you only have access to one process at a time. rr does in fact replay
> the entire "constellation" of processes that were recorded, but gdb is gdb.
Well, in theory you can use gdb in multi inferior mode with a gdb server
like rr. It seems pretty useful for e10s type stuff so I'm tempted to
try adding support in rr some time.
More information about the rr-dev