From: Siwei He via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: Louis-He <1726110778@qq.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: A potential fix for PR-24069
Date: Wed, 2 Feb 2022 16:01:19 -0500 [thread overview]
Message-ID: <CAE1H+iEug4oQF1ty9tMz9xJUD1kW=6e7ZUuBcXPfuSAxzhFwvA@mail.gmail.com> (raw)
In-Reply-To: <a391fffb-038c-7019-faa3-1000e331aa89@simark.ca>
[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]
Hi Simon,
You are absolutely right. I am new to the community and I noticed that I
didn't merge two of my commits together in the patch file. I have already
merged them and included in the attachment in this email. I also uploaded
it to the bug report:
https://sourceware.org/bugzilla/attachment.cgi?id=13953
Best,
Louis
On Wed, 2 Feb 2022 at 15:57, Simon Marchi <simark@simark.ca> wrote:
> On 2022-02-02 2:31 p.m., siweihe.eng--- via Gdb-patches wrote:
> > From: Louis-He <1726110778@qq.com>
> >
> > After this fix, the possibility of successful run on mac os increases.
> However, it is still possible that the gdb hangs. A workaround is issue
> "control+c" and the gdb will continue running as expected. The root cause
> of the bug hasn't been identified, and this fix is a temporary patch to
> PR-24069.
> > ---
> > gdb/darwin-nat.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
> > index bba6acc7ea1..844dbf499fe 100644
> > --- a/gdb/darwin-nat.c
> > +++ b/gdb/darwin-nat.c
> > @@ -1104,16 +1104,16 @@ darwin_nat_target::decode_message
> (mach_msg_header_t *hdr,
> > }
> >
> > if (WIFEXITED (wstatus))
> > - {
> > - status->set_exited (WEXITSTATUS (wstatus));
> > - }
> > + {
> > + status->set_exited (WEXITSTATUS (wstatus));
> > + }
> > else if (WIFSTOPPED (wstatus))
> > {
> > - status->set_ignore ();
> > + status->set_ignore ();
> > inferior_debug (4, _("darwin_wait: pid %d received
> WIFSTOPPED\n"), res_pid);
> > return minus_one_ptid;
> > }
> > - else
> > + else
> > {
> > status->set_signalled
> > (gdb_signal_from_host (WTERMSIG (wstatus)));
> > --
> > 2.32.0 (Apple Git-132)
> >
>
>
> Hi,
>
> You patch doesn't seem to change anything, except whitespaces, I guess
> that's not
> what you meant to send.
>
> Simon
>
[-- Attachment #2: 0001-gdb-A-potential-fix-for-PR-24069.patch --]
[-- Type: application/octet-stream, Size: 1260 bytes --]
From 951136540042788b78ef4aec8895a889a3b083f1 Mon Sep 17 00:00:00 2001
From: Louis-He <1726110778@qq.com>
Date: Wed, 2 Feb 2022 14:51:43 -0500
Subject: [PATCH] gdb: A potential fix for PR-24069
After this fix, the possibility of successful run on mac os increases. However, it is still possible that the gdb hangs. A workaround is issue "control+c" and the gdb will continue running as expected. The root cause of the bug hasn't been identified, and this fix is a temporary patch to PR-24069.
---
gdb/darwin-nat.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index d96ce1a6c65..844dbf499fe 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1102,8 +1102,17 @@ darwin_nat_target::decode_message (mach_msg_header_t *hdr,
status->set_ignore ();
return minus_one_ptid;
}
+
if (WIFEXITED (wstatus))
- status->set_exited (WEXITSTATUS (wstatus));
+ {
+ status->set_exited (WEXITSTATUS (wstatus));
+ }
+ else if (WIFSTOPPED (wstatus))
+ {
+ status->set_ignore ();
+ inferior_debug (4, _("darwin_wait: pid %d received WIFSTOPPED\n"), res_pid);
+ return minus_one_ptid;
+ }
else
{
status->set_signalled
--
2.32.0 (Apple Git-132)
next prev parent reply other threads:[~2022-02-02 21:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 19:31 siweihe.eng--- via Gdb-patches
2022-02-02 20:57 ` Simon Marchi
2022-02-02 21:01 ` Siwei He via Gdb-patches [this message]
2022-02-02 21:26 ` Simon Marchi
2022-02-03 18:04 ` Siwei He via Gdb-patches
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='CAE1H+iEug4oQF1ty9tMz9xJUD1kW=6e7ZUuBcXPfuSAxzhFwvA@mail.gmail.com' \
--to=gdb-patches@sourceware.org \
--cc=1726110778@qq.com \
--cc=simark@simark.ca \
--cc=siweihe.eng@gmail.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