Debugging workflow: cygdb, debugging symbols and system Python

250 views
Skip to first unread message

Alexander Eberspächer

unread,
Oct 15, 2014, 3:19:54 PM10/15/14
to cython...@googlegroups.com
Dear list,

I would like to ask for advice on a sensible debugging work-flow - on a system
with a few "boundary conditions" in place.

First of all, I use a Xubuntu 14.04 machine. Here, Python 2.7 is system
default, I also develop against that version. python-dbg is installed. As it
turns out, Ubuntu's gdb is linked against Python 3 (for unknown reasons), so I
decided to install a local gdb that is configured with --with-python2.

In that state, "gdb python-dbg" brings up gdb that happily uses Python 2.7
debug information. However, as it turns out, as soon as my scientific Python
software stack is imported in a script I'd like to debug, I get an error:

ImportError: /usr/local/lib/python2.7/dist-packages/scipy/special/_ufuncs.so: undefined symbol: Py_InitModule4_64

This is apparently due to my packages not being compiled with debugging symbols
[1]. If I was using system default versions here, I'd happily go with the *-dbg
packages from the repositories, however, all of scientific Python is built by
myself.

Actually, all I want is to use cygdb in principle as my project is
Python/Cython/Fortran. However, I can't get cygdb to start with a Python that
has debugging symbols:

    Python was not compiled with debug symbols (or it was stripped). Some functionality may not work (properly).

Even if I could, I'd still probably run into the problem I described above. My own
package is compiled with Cython's --gdb options as well as with -g for all gcc/gfortran.

This is where I appreciated your input. How do you handle Cython debugging?
Does cygdb do the job for you? If so, how? How do you deal with a software
stack that doesn't have debugging symbols at hand?

Thanks for your help with this somewhat tangled problem somewhere in-between
what's possible, what's needed and what's easiest.

Regards

Alex Eberspächer


[1] http://hustoknow.blogspot.de/2013/06/why-your-python-program-cant-start-when.html



Ben Irv

unread,
Feb 23, 2015, 8:18:07 AM2/23/15
to cython...@googlegroups.com
Hi,

I'm confused in a similar way.

Does anyone have any comments on the previous post?

Ben
Reply all
Reply to author
Forward
0 new messages