This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] fork in multi-threaded apps, per-thread pending_fork, other follow-fork cleanups.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 8 Jun 2009 10:21:54 -0400
- Subject: Re: [RFC] fork in multi-threaded apps, per-thread pending_fork, other follow-fork cleanups.
- References: <firstname.lastname@example.org>
> So, what to do? One way to go about this, is to detect that
> the user switched threads, since the fork event was reported, follow
> the child, and refuse to resume it, leaving up to the user to
> decide what to do with it:
FWIW, I'm a little late in answering, but the behavior seems reasonable
to me. I'd personally hate the debugger switching threads from under me
without giving me the option of canceling my operation.
> warning: Not resuming: switched threads before following fork child.
I do find the message a little terse as to what is going on, and why
the resume was aborted. I wonder if we can be a little more explicit?
Is there a way for the user to determine which thread to switch back
to in order to be able to resume?