Getting Stack Trace on segfault

rocky.bernstein at rocky.bernstein at
Sat Apr 7 15:36:15 CEST 2007

After a night's rest, I was able to add a function trace to pydb,
command option --fntrace, short option -F, and set/show command

It's still a little bit funky. (Hey, I didn't get *that* good of a
rest). But it's out there in pydb's CVS in case folks want to try it.

Also, following an idea given in the recipe, I've extended the 'Call'
and 'Return' indicators so that we list the current stack level. For
"Return" we'll also list the return value (or at least a repr() of it
for strings and scalars) and/or return type. What's a little odd here
is that levels from the debugger are included in the nesting count. So
the top-level in the user program will be greater than 1.

It's possible there will be another release around the time of the
next ipython release since there is better coordination between the
two with respect to colorizing lines of code.

On Apr 6, 10:49 pm, "rocky.bernst... at"
<rocky.bernst... at> wrote:
> On Apr 6, 8:13 am, James Stroud <jstr... at> wrote:
> > Hello All,
> > The built-in mac osx vecLib is segfaulting in some cases--A very fun
> > fact to find out the hard way over two nights of work. I also spent an
> > embarrassing amount of time figuring out just where. Although I'm in
> > quite a self-congratulatory mood right now, in the future, I feel like I
> > could save a lot of time by coercing the interpreter to spew forth
> > method calls to stderr. Is this possible?
> > I would hope to produce something hauntingly reminiscent of
> > [] my_function
> > [my_function] another_function
> > [my_function -> another_function] yet_a_deeper_function
> > Presentation, of course, is irrelevant.
> > I read the docs onpdb, but it did not seem to do what I want--unless,
> > of course, I missed something.
> > James
> pydb (http://bashdb.sf.net0has the ability to do noninteractive line
> tracing.  See
> or the showmedo demo. It would be kind of neat to extend this to allow
> for method/fn tracing. Alas the simple hack I tried, didn't work
> because of code obscurities. (The code could stand to use a rewrite.)

More information about the Python-list mailing list