Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 1

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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.