[Zope-dev] maybe we could script it (Re: hooking up gdb)

Leonardo Rochael Almeida leo@hiper.com.br
05 Dec 2001 19:00:53 -0200


On Wed, 2001-12-05 at 18:41, Matthew T. Kromer wrote:
> Leonardo Rochael Almeida wrote:
> 
> 
> 
> 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.
> 
> Its been a while since I prowled the gdb source.  I may not be able to 
> do anything automatic like you want -- but I sure wish that tool was 
> available!

Maybe we could script it. If we can convince python, in the event of a
SIG11, freeze every other thread and run some python function, or even
an external script, we could make this script invoke gdb with another
script (a gdb script) that would attach to the zope python process and
get a stack trace of every thread.

No need to get fancy with C.

Now the nice thing would be if I could generate a Zope package just like
the binary Zopes at zope.org, but compiled with my options (such as -g).

Speaking of options, is linux-binary-Zope-2.4.3-python still being
compiled with --pymalloc? As I mentioned before, our segfaults reduced
drastically WITHOUT it.

	Cheers, Leo

PS: if anyone is wondering why I keep changing the subject in this
thread, check out this URL:
http://udell.roninhouse.com/GroupwareReport.html

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.