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

Pedro Alves
2022-03-31T16:12:31Z

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.

> + /* Child */
> + _exit(12);

Space before parens.

Otherwise OK. Thanks.