gdb unable to read python frame information

Wesley nispray at
Sat Mar 8 16:01:52 CET 2014

So, let me clarify here, in order to try, I get a clean machine.

Centos 6.5 64bit.
Now , I try this:
1. install gdb 7.7 from source , with configure option --with-python

2. install python 2.6.6 from source, with configure option --with-pydebug

3. run a python script

4. from command line, gdb python -p <pid> to attach the running script

5. within gdb, issue python, import libpython, end 
  no errors
6. py-bt outputs nothing, py-locals says Unable to locate python frame
here is the snippet:
[root at localhost Python-2.6.6]# gdb python 52315
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
Attaching to program: /home/nipen/test/Python-2.6.6/python, process 52315
Reading symbols from /lib64/ debugging symbols found)...done.
Loaded symbols for /lib64/
0x00000030a98e15c3 in ?? ()
(gdb) bt
#0  0x00000030a98e15c3 in ?? ()
#1  0x00007f4cf68d1219 in ?? ()
#2  0x0000000000000000 in ?? ()
(gdb) py-bt
Undefined command: "py-bt".  Try "help".
(gdb) python
>import libpython
(gdb) py-bt
(gdb) py-locals
Unable to locate python frame
Unable to locate python frame

More information about the Python-list mailing list