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] Fix PR 12702 - gdb can hang waiting for thread group leader (gdbserver)


On Thu, Jul 25, 2013 at 2:25 AM, Pedro Alves <palves@redhat.com> wrote:
> On 07/20/2013 10:59 AM, Hui Zhu wrote:
>> Hi,
>>
>> I got a issue with leader-exit.exp will hang with target_board=native-gdbserver.
>> I found the reason is gdbserver still have this issue.  So I post a
>> patch for gdbserver.
>
> leader-exit.exp is part of a series of tests for a set of related
> problems.  See:
>
>   http://www.sourceware.org/ml/gdb-patches/2011-10/msg00704.html
>
> Several are currently masked because gdbserver doesn't support
> fork/exec yet.
>
> We should fix this by implementing TARGET_WAITKIND_NO_RESUMED
> on gdbserver, like the patch above did for native.
>
> --
> Pedro Alves
>

Hi Pedro,

According to your comments, I make a new patch to add
TARGET_WAITKIND_NO_RESUMED to gdbserver.
It can pass the leader-exit.exp and pass the regression test.

Please help me review it.

Thanks,
Hui

2013-11-19  Hui Zhu  <hui@codesourcery.com>

* common/ptid.c (ptid_match): New.
* common/ptid.h (ptid_match): New extern.
* inferior.h (ptid_match): Removed.
* infrun.c (ptid_match): Removed.

2013-11-19  Hui Zhu  <hui@codesourcery.com>

* linux-low.c (sigchld_mask): New.
(handle_extended_wait): Add debug output.
(num_lwps): New.
(check_zombie_leaders_callback): New.
(check_zombie_leaders): New.
(not_suspended_callback): New.
(check_pending_stop): New.
(linux_wait_for_lwp): Call my_waitpid with WNOHANG.
(linux_wait_for_event): Change the return check for
linux_wait_for_lwp.
(wait_lwp): New.
(wait_for_sigstop): Call wait_lwp.
* linux-low.h (lwp_info): Add pending_stop.
* server.c (handle_target_event): Add check for
TARGET_WAITKIND_NO_RESUMED.

Attachment: 2-fix-12702.txt
Description: Text document


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