Debugging a c-extension in python
Question: I run [bayesopt](http://rmcantin.bitbucket.org/html/) with python bindings. So
I have a `bayesopt.so` that I import from python (a C-extension).

When I run it, it core dumps. I want to load this core dump in gdb to see what
the issue is. How can I do this? Or get information on it?

I tried to load gdb on it, but of course it asks for a binary which I don't
have since it's a `.so`.


Answer: You want to run gdb on python, ie: `gdb -ex r --args python myscript.py`.
There's some helpful tips in the python wiki:
<https://wiki.python.org/moin/DebuggingWithGdb>

