3

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.