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] Add new internal variable $_signo


>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> 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
to use.

The one major benefit, I think, would be that scripts could simply use
$_siginfo.si_signo unconditionally.

Tom


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