[RFC] fork in multi-threaded apps, per-thread pending_fork, other follow-fork cleanups.

Joel Brobecker brobecker@adacore.com
Mon Jun 8 14:22:00 GMT 2009


> 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?

-- 
Joel



More information about the Gdb-patches mailing list