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: [RFC/PATCH] New convenience variable $_exitsignal


On Sat, Jun 15, 2013 at 11:25 PM, Sergio Durigan Junior
<sergiodj@redhat.com> wrote:
> This patch was proposed by Pedro at:
>
> <http://sourceware.org/ml/gdb-patches/2013-06/msg00337.html>
>
> It adds a new convenience variable called "$_exitsignal", which will
> hold the signal number when the inferior terminates due to the uncaught
> signal.
>
> I've made modifications on infrun.c:handle_inferior_event such that
> $_exitcode gets cleared when the inferior signalled, and vice-versa.
> This assumption was made because IMO the variables are mutually
> exclusive, i.e., when the inferior terminates because of an uncaught
> signal it is not possible for it to return.  Anyway, Pedro's explanation
> seems to follow the same logic.
>
> The patch also adds a NEWS entry, documentation bits, and a testcase.
>
> OK to apply?

Hi.
I'd like the documentation to explain how it's intended that the two
(exitcode/exitsignal) are intended to be used together.  E.g., how
does one know which one has a useful value?


> gdb/ChangeLog:
> 2013-06-16  Sergio Durigan Junior  <sergiodj@redhat.com>
>
>         * NEWS: Mention new convenience variable "$_exitsignal".
>         * infrun.c (handle_inferior_event): Set internal variable
>         "$_exitsignal" for TARGET_WAITKIND_SIGNALLED and clear
>         "$_exitcode", vice-versa for TARGET_WAITKIND_STOPPED.


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