This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Add convenience variable $_exitsignal


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]