Reputation: 16005
I have a test that runs a python script, which calls into C++ code, where it segfaults and dumps core. I've tried to load the core file in GDB using /usr/bin/python2.6, but this just gives me ?? for all the items in the stack trace. How do I debug this core file?
Upvotes: 3
Views: 593
Reputation: 34304
You need to compile a version of Python with debugging symbols. You can do this by building Python with ./configure --with-pydebug
. Hopefully you will be able to find the error that way.
That will change the behavior of Python internally in some ways. If you don't still get the segfault that way, you might try running ./configure CFLAGS="-O0 -ggdb3"
or even just ./configure CFLAGS=-ggdb3
.
Upvotes: 1