This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/PATCH] New convenience variable $_exitsignal
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>, Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, "'GDB Patches'" <gdb-patches at sourceware dot org>
- Date: Tue, 17 Sep 2013 12:36:55 -0600
- Subject: Re: [RFC/PATCH] New convenience variable $_exitsignal
- Authentication-results: sourceware.org; auth=none
- References: <m3mwqqvagk dot fsf at redhat dot com> <00db01ce6b24$0b716aa0$22543fe0$ at muller@ics-cnrs.unistra.fr> <m3zjuotykn dot fsf at redhat dot com> <m37ghqn1as dot fsf at redhat dot com> <52374823 dot 4010203 at redhat dot com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> I can't say I really understand how any of that argues against my
Pedro> original rationale for not setting $_exitsignal on corefiles (because
Pedro> the inferior has not really exited at the point the core has been
Pedro> generated), rather than point at implementation choices.
Pedro> Now, if one were to instead argue that _user interface_ -wise, it'd
Pedro> make sense to set $_exitsignal, because we also print
Pedro> "Program terminated with signal", (emphasis on "terminated"), then
Pedro> I'd agree:
I may have missed part of the thread, but what is the rationale for
being so precise here? It seems a bit pedantic to me -- which is fine
if there is a purpose to it, but I couldn't think of one in this case.
That is, gdb has a bit of information that is relevant to the user. It
is useful to users if we expose it to them in a script-friendly way. We
already have $_exitsignal, and differentiating between "the program
exited with signal X" and "the program is about to exit with signal X"
doesn't seem particularly handy.
Another consideration along these lines is that I have a branch in
progress for "catch exit" -- it's been waiting for Sergio's work on
these convenience variables. I think here as well $_exitsignal seems
like a natural fit, even though the process has not technically exited
at the catchpoint.
Tom