This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]