Re: [PATCH] Fix PR 12702 - gdb can hang waiting for thread group leader (gdbserver)

Pedro Alves
2014-02-27T14:38:30Z

On 01/23/2014 02:00 PM, Pedro Alves wrote:
> This is main gripe with this patch. I'd really like to avoid
> bringing in more of this broken use of waitpid(PID) into gdbserver
> (I realize most of this is copied from GDB), and this duplication
> of low level wait status handling. I think we can do
> better in gdbserver. There's really no need for wait_for_sigstop
> to wait for each LWP in turn. I think that with some
> refactoring, we can make it reuse linux_wait_for_event, and
> only end up with having to handle pending statuses in one place.
>
> So I've been working on this most of this week, and I got this
> almost done but I'm afraid I'll need to give attention to other
> work, so I'm not sure I'll be able to be back at this before
> February. Anyway, I'll post a WIP series in response to this email.

I've now rebased this on current mainline, wrote ChangeLogs, etc.
and pushed it.

https://sourceware.org/ml/gdb-patches/2014-02/msg00826.html

> In addition, it goes a step forward and starts adding support for
> TARGET_WAITKIND_NO_RESUMED to the RSP as well, which is needed for
> fully fixing no-unwaited-for-left.exp.

I didn't get to finish that one yet, so I've left it out for now.

--
Pedro Alves