This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Add convenience variable $_exitsignal
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org, dje at google dot com, palves at redhat dot com
- Date: Tue, 18 Jun 2013 21:55:20 +0300
- Subject: Re: [PATCH v2] Add convenience variable $_exitsignal
- References: <m3ehbzqmsn dot fsf at redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, Doug Evans <dje@google.com>,
> Pedro Alves <palves@redhat.com>
> Date: Tue, 18 Jun 2013 15:46:48 -0300
>
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index e6ec4ff..a445b1a 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -9734,8 +9734,15 @@ to match the format in which the data was printed.
>
> @item $_exitcode
> @vindex $_exitcode@r{, convenience variable}
> -The variable @code{$_exitcode} is automatically set to the exit code when
> -the program being debugged terminates.
> +When the program being debugged terminates normally, @value{GDBN}
> +automatically sets this variable to the exit code of the program, and
> +clears @code{$_exitsignal}.
> +
> +@item $_exitsignal
> +@vindex $_exitsignal@r{, convenience variable}
> +When the program being debugged dies due to an uncaught signal,
> +@value{GDBN} automatically sets this variable to that signal's number,
> +and clears @code{$_exitcode}.
This is good, but I wonder whether the meaning of "clears $_exitcode"
will be sufficiently clear (pun intended) to the reader. You mean to
say that the variable will be void, right?
Thanks.