From: Pedro Alves <pedro@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Doug Evans <dje@google.com>
Subject: Re: [patch] Workaround for 10970, 12702, avoid calling waitpid
Date: Wed, 18 May 2011 19:17:00 -0000 [thread overview]
Message-ID: <201105182017.22006.pedro@codesourcery.com> (raw)
In-Reply-To: <20110518185302.GA5585@host1.jankratochvil.net>
On Wednesday 18 May 2011 19:53:02, Jan Kratochvil wrote:
> > The inferior exit code reported to the core/user will be the
> > exit code of the last LWP that exits, instead of the
> > leader's exit code. We've stepped out of C realm when
> > the leader exited, so I'm not sure that matters (or how
> > to make it be != 0, even).
>
> I do not understand this comment much. That != 0 is here for PID from waitpid
> which is unrelated to the exit code (present in STATUS).
I was talking about the exit code of the last cloned
lwp to exit ending up as exit code of the inferior
(TARGET_WAITKIND_EXITED's value.integer), not the
return of that waitpid call.
linux_nat_filter_event
...
if (num_lwps (GET_PID (lp->ptid)) > 1)
{
/* If there is at least one more LWP, then the exit signal
was not the end of the debugged application and should be
ignored. */
exit_lwp (lp);
return NULL;
}
...
linux_nat_wait_1
store_waitstatus (ourstatus, status);
When the last lwp exits, we'll report it's exit code as the
inferior exit code to infrun, instead of the leader's exit
code.
>
>
> No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
>
> I will check it in if no futher comments appear.
--
Pedro Alves
next prev parent reply other threads:[~2011-05-18 19:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 18:19 Doug Evans
2011-05-17 22:08 ` Jan Kratochvil
2011-05-18 17:13 ` Jan Kratochvil
2011-05-18 18:17 ` Pedro Alves
2011-05-18 18:53 ` Jan Kratochvil
2011-05-18 19:17 ` Pedro Alves [this message]
2011-05-18 19:32 ` Jan Kratochvil
2011-05-18 19:53 ` Pedro Alves
2011-05-18 22:21 ` Doug Evans
2011-05-27 17:04 ` Jan Kratochvil
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=201105182017.22006.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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