This is the mail archive of the
mailing list for the GDB project.
Re: [RFC/PATCH] Add new internal variable $_signo
- From: Tom Tromey <tromey at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Wed, 17 Jul 2013 12:40:52 -0600
- Subject: Re: [RFC/PATCH] Add new internal variable $_signo
- References: <m3obb9y1aw dot fsf at redhat dot com>
>>>>> "Sergio" == Sergio Durigan Junior <firstname.lastname@example.org> writes:
Sergio> Basically, the ABRT project (<https://fedorahosted.org/abrt/wiki>) wants
Sergio> to be able to perform some analysis on corefiles (to be implemented as a
Sergio> Python GDB module) and for that it needs to be able to inspect the
Sergio> signal which killed the program being investigated.
I read through this thread. It was very informative.
If you are not planning to tackle all the items Pedro pointed out, would
you mind filing bugs for the ones you are not planning to do?
Sergio> (gdb) core ./coredump
Sergio> [New LWP 2703]
Sergio> Core was generated by `/usr/bin/gnote <<skip>>'.
Sergio> Program terminated with signal 11, Segmentation fault.
Sergio> #0 0x09fa5348 in ?? ()
Sergio> (gdb) print $_siginfo.si_signo
Sergio> Unable to read siginfo
One other idea that occurs to me is that, in this situation, $_siginfo
could yield a value where only the si_signo bits are available. We've
already got all the machinery needed to make this work.
TBH I'm not sure if this idea is clever and simple, or obscure and hard
The one major benefit, I think, would be that scripts could simply use