From: Pedro Alves <alves.ped@gmail.com>
To: John Baldwin <jhb@freebsd.org>
Cc: Pedro Alves <palves@redhat.com>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Don't compare the pid returned from wait() against inferior_ptid.
Date: Wed, 8 Jul 2020 19:40:35 +0100 [thread overview]
Message-ID: <CAJvqv7NU0WFAZ3WtO9U2VPZ5Lj+H02rCumMuiMYw2LeRLbqTiQ@mail.gmail.com> (raw)
In-Reply-To: <20200708004605.91238-1-jhb@FreeBSD.org>
My Internet is down today (and mobile data is crawling slow so no
tethering, probably same root issue, as its the same provider), so reply
via mobile it is.
This is OK.
A Qua, 8/07/2020, 01:54, John Baldwin <jhb@freebsd.org> escreveu:
> inf_ptrace::wait() needs to discard termination events reported by
> detached child processes. Previously it compared the returned pid
> against the pid in inferior_ptid to determine if a termination event
> should be discarded or reported. inferior_ptid is now null_ptid in
> wait() target methods, so this was always failing and never reporting
> exit events. Instead, report termination events whose pid matches any
> inferior belonging to the current target.
>
> gdb/ChangeLog:
>
> * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
> inferior_ptid.
> ---
> gdb/ChangeLog | 5 +++++
> gdb/inf-ptrace.c | 2 +-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index c86d7e4647..d4cd0d014e 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,8 @@
> +2020-07-07 John Baldwin <jhb@FreeBSD.org>
> +
> + * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
> + inferior_ptid.
> +
> 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
>
> PR python/22748
> diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
> index d25d226abb..ae0b0f7ff0 100644
> --- a/gdb/inf-ptrace.c
> +++ b/gdb/inf-ptrace.c
> @@ -347,7 +347,7 @@ inf_ptrace_target::wait (ptid_t ptid, struct
> target_waitstatus *ourstatus,
> }
>
> /* Ignore terminated detached child processes. */
> - if (!WIFSTOPPED (status) && pid != inferior_ptid.pid ())
> + if (!WIFSTOPPED (status) && find_inferior_pid (this, pid) ==
> nullptr)
> pid = -1;
> }
> while (pid == -1);
> --
> 2.25.1
>
>
prev parent reply other threads:[~2020-07-08 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 0:46 John Baldwin
2020-07-08 9:48 ` Gary Benson
2020-07-08 16:46 ` John Baldwin
2020-07-08 16:52 ` Simon Marchi
2020-07-09 16:37 ` John Baldwin
2020-07-09 17:34 ` Eli Zaretskii
2020-07-08 18:40 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJvqv7NU0WFAZ3WtO9U2VPZ5Lj+H02rCumMuiMYw2LeRLbqTiQ@mail.gmail.com \
--to=alves.ped@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox