Take the 2-minute tour ×

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.

share|improve this question
add comment

1 Answer

Here's the problem: to have access to debugging symbols in GDB, you must invoke a different binary: "python-dbg" instead of "python" (found this in /usr/share/doc/python2.7-dbg/README.debug).

share|improve this answer
add comment

Your Answer


