gdb unable to read python frame information

dieter dieter at
Mon Mar 10 08:28:30 CET 2014

Wesley <nispray at> writes:

> If you don't read the loop from the top, and don't tell me exactly what you want by just keep saying context, please ingore this post.

You are doing things only a few people do: trying to debug
a Python process on C level -- and you observe really strange things.
It is very difficult to guess from the distance what goes wrong.

Apparently, your gdb sees a very strange state of the debugged
process. But why?

Missing symbols was the first guess (the
gdb output you have provided does not suggest this - but
I have not seen the "reading symbols from "python" ..."; thus,
there may still be a problem with this).

A runaway process is another guess.

Some gdb problem another one.

I would approach the situation by simplifying the setup.
Instead of attaching a running Python process, I would
use "gdb python"; then "run"; then "CTRL-C" and there look
what "bt" gives you (this should demonstrate whether your
"gdb" is set up correctly and can debug Python on C level).
Then you write an infinitely running function in Python,
run it and again interrupt with "gdb" to see whether the "py-*"
commands are working. If this all work, you come again
to your actual task -- understanding what your python process
is doing.

More information about the Python-list mailing list