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: [PATCH] PR threads/20743: Don't attempt to suspend or resume exited threads.


On 12/27/2016 09:03 PM, John Baldwin wrote:
> I added the assertion for my own sanity.  I suspect gdb should never try to
> invoke target_resume() with a ptid of an exited thread, but if for some
> reason it did the effect on FreeBSD would be a hang since we would suspend
> all the other threads and when the process was continued via PT_CONTINUE it
> would have nothing to do and would never return from wait().  I'd rather have
> gdb fail an assertion in that case rather than hang.

OOC, what happens on FreeBSD on the gdb.threads/no-unwaited-for-left.exp test?

That test:

 - spawns a thread
 - gdb switches to that thread, and,
 - enables "set scheduler-locking on", and "continue"s.
 - the child thread exits
 - gdb should not hang.

It used to hang on Linux, until TARGET_WAITKIND_NO_RESUMED was added.

Thanks,
Pedro Alves


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