I am using GDB to debug a segmentation fault in my python application on Kubuntu 12.04. Supposedly GDB version 7 has built-in macros for extracting information about the python stack (http://docs.python.org/devguide/gdb.html), but I am having trouble getting it to work. I have installed python-dbg.
When I ask for a python stack trace in GDB, the result looks like this:
(gdb) py-bt
#5 (unable to read python frame information)
#16 (unable to read python frame information)
#26 (unable to read python frame information)
...
My GDB version is 7.4-2012.04-0ubuntu2, Python is 2.7.3-0ubuntu3.