This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] Implement $_exitsignal
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Thu, 12 Sep 2013 16:53:19 -0300
- Subject: Re: [PATCH v3] Implement $_exitsignal
- Authentication-results: sourceware.org; auth=none
- References: <m3d2p1xy2w dot fsf at redhat dot com> <CADPb22T3==EfPHXoUGqomO4n9KBK3rZ8kZRKXM3nt_HZmv2-gw at mail dot gmail dot com>
On Monday, September 09 2013, Doug Evans wrote:
> Hi.
>
> The docs don't say this,
>
> [and there may be a better place in the docs to say it, and it may not
> currently be possible ... but with those caveats in mind ... :-)]
>
> I need to see documented a way for a script to know which of
> $_exitcode and $_exitsignal to look at.
Thanks for the reply, Doug. According to what we discussed on IRC, I
implemented a new convenience function called $_isvoid(), which can be
used to check whether a convenience variable is void. This should be
enough for someone who needs to use $_exit{code,signal} in their
scripts, because when one of them is set (i.e., has a non-void value),
the other is void.
I will post the $_isvoid patch for discussion/approval, and then I will
make the necessary modifications on the $_exitsignal patch in order to
include instructions for scripting.
--
Sergio