Re: [PATCH 2/8] gdb/linux-nat: remove check based on current_inferior in linux_handle_extended_wait

Simon Marchi via Gdb-patches
2022-03-31T17:07:19Z

On 2022-03-31 12:12, Pedro Alves wrote:
> On 2022-01-17 16:27, Simon Marchi via Gdb-patches wrote:
>
>> diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
>> index b926fb5eba9e..7de4da03a34f 100644
>> --- a/gdb/linux-nat.c
>> +++ b/gdb/linux-nat.c
>> @@ -2096,20 +2096,11 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
>>
>> if (event == PTRACE_EVENT_VFORK_DONE)
>> {
>> - if (current_inferior ()->waiting_for_vfork_done)
>> - {
>> - linux_nat_debug_printf
>> - ("Got expected PTRACE_EVENT_VFORK_DONE from LWP %ld: stopping",
>> - lp->ptid.lwp ());
>> -
>> - ourstatus->set_vfork_done ();
>> - return 0;
>> - }
>> -
>> linux_nat_debug_printf
>> - ("Got PTRACE_EVENT_VFORK_DONE from LWP %ld: ignoring", lp->ptid.lwp ());
>> -
>> - return 1;
>> + ("Got expected PTRACE_EVENT_VFORK_DONE from LWP %ld",
>> + lp->ptid.lwp ());
>
> Please drop the "expected" from the log, as we're not checking
> waiting_for_vfork_done anymore.

Done.

>
>> + /* Child */
>> + _exit(12);
>
> Space before parens.

Done.

> Otherwise OK. Thanks.

Thanks, I'll push this patch on its own, since it's self-contained.

Simon