hooking up gdb (was Re: [Zope-dev] More signal 11 restarts....)
Dieter Maurer
dieter@handshake.de
Wed, 5 Dec 2001 23:41:22 +0100
Matthew T. Kromer writes:
> ...
> Well largely, ALL I want is the backtrace -- and I'm wondering if I
> could cobble something together that could get it. The problem is it
> needs to look at the symbol table, and I dont know how to get at that
> via C -- ie, gdb doesnt have an interface that I know of that you can
> link in to grab a stack trace and exit.
I seem to remember that one can define gdb commands that are executed
whenever the program stops.
It this were true, we could activate such a definition in a ".gdbinit"
file and then run the program.
When the Python stops due to a signal, the command would be activated.
It would make a backtrace followed by a quit.
Not sure, it will work, though...
Dieter