Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Siwei He <siweihe.eng@gmail.com>
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:26:52 -0500	[thread overview]
Message-ID: <4bf807c4-d78f-05a4-6cf5-4fa283bc7c1d@simark.ca> (raw)
In-Reply-To: <CAE1H+iEug4oQF1ty9tMz9xJUD1kW=6e7ZUuBcXPfuSAxzhFwvA@mail.gmail.com>

On 2022-02-02 4:01 p.m., Siwei He via Gdb-patches wrote:
> 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
Thanks, that makes more sense.

I'd like if we could at least get some understanding of what's happening
here and get an explanation in the commit message, otherwise it feels
like just feels like throwing random things on the wall and seeing what
sticks.

Could you please provide the output of a GDB session running a trivial
program, with both "set debug infrun 1" and "set debug darwin 12" (not a
typo, the last one is really "12")?  Then we can have an idea of the
sequence of events.  If you can get one where things work and one where
things don't work, it would be even better, since it would allow us to
compare.

I'm trying to understand what the code you change does.  It is in a
scope that starts like this:

  else if (hdr->msgh_id == 0x48)
    {
      /* MACH_NOTIFY_DEAD_NAME: notification for exit.  */

What does that mean, does it mean we have received some message /
notification to tell us the inferior has exited?  So what does it mean
to then receive a WIFSTOPPED wait status for that pid?

I think it would be useful do add a debug print just after the wait4
call above, to print (in hexadecimal) the wstatus value returned by
wait4.

Simon

  reply	other threads:[~2022-02-02 21:27 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
2022-02-02 21:26     ` Simon Marchi [this message]
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=4bf807c4-d78f-05a4-6cf5-4fa283bc7c1d@simark.ca \
    --to=simark@simark.ca \
    --cc=1726110778@qq.com \
    --cc=gdb-patches@sourceware.org \
    --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