Re: [PATCH] PR/12691 Add the inferior to Python exited event

Eli Zaretskii
2011-08-31T17:27:35Z

> From: Kevin Pouget <kevin.pouget@gmail.com>
> Date: Wed, 31 Aug 2011 16:57:48 +0200
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> [1:text/plain Hide]
> On Wed, Aug 31, 2011 at 4:46 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> From: Kevin Pouget <kevin.pouget@gmail.com>
> >> Date: Wed, 31 Aug 2011 16:33:55 +0200
> >> Cc: gdb-patches@sourceware.org
> >>
> >> The doc was accepted, but I had to reshape the paragraph during the
> >> update, Eli, could you please tell me what you think about it?
> >
> > I have a couple of minor comments:
>
> >> +@defivar ExitedEvent inferior
> >> +A reference to the inferior which triggered the exited event.
> >
> > I'd suggest to use @code{exited}, since this is a Python symbol.
>
> this one is fine,
>
> >> Â @defivar ExitedEvent exit_code
> >> -An integer representing the exit code which the inferior has returned.
> >> +An integer representing the exit code which the inferior has returned.
> > Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â ^^^
> > I think we would be better off without that "has" word.
> >
> >> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  (Optional,
> >> +will exist only in the case that the inferior exited with some status.)
> >
> > I understand you want to tell that the exit_code attribute is
> > optional? Â This calls for some rewording, but I actually don't
> > understand how can it be that an inferior doesn't return any exit code
> > at all. Â AFAIK, the exit code could be random garbage, but it's always
> > there. Â Can you explain?
>
> but for these two, I didn't write it myself: as you can read in the patch,
> I only rearranged the sentence to include my information, the points
> you mention were not changed.
> (Let me know if you want me to change something anyway)

I would rephrase like this:

An integer representing the exit code, if any, that the inferior
returned.

I'd still like to hear from someone "in the know" how is it possible
that the exit code won't be available, but let's not block the commit
on that behalf.

Thanks.