
Hi, I tried to use gdbinit today and found that the "fragile" pystacks macro didn't work anymore. I don't know gdb very well, but this turned out to work a bit more reliably: # print the entire Python call stack define pystack set $last=0 while $sp != $last if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx pyframe end set $last=$sp up-silently 1 end select-frame 0 end Just in case anybody might want to use this and update the existing gdbinit. Christian PS: I'm not subscribed to this list.

Christian> I tried to use gdbinit today and found that the "fragile" Christian> pystacks macro didn't work anymore. I don't know gdb very Christian> well, but this turned out to work a bit more reliably: ... Thanks. I'll give it a try and check it in if it checks out. Skip

On Tue, 15 May 2007 09:26:55 -0500, skip@pobox.com wrote:
Christian> I tried to use gdbinit today and found that the "fragile" Christian> pystacks macro didn't work anymore. I don't know gdb very Christian> well, but this turned out to work a bit more reliably:
...
Thanks. I'll give it a try and check it in if it checks out.
It would also be nice if it handled non-main threads. This is accomplished by additionally checking if the pc is in t_bootstrap (ie, between that and thread_PyThread_start_new_thread). Jean-Paul
participants (3)
-
Christian Theune
-
Jean-Paul Calderone
-
skip@pobox.com