Windows Debugging w/o MS

Christopher Anderson sidewinder.asu at gmail.com
Tue May 22 21:49:04 EDT 2007


Hello all. I have a fairly fundamental question that I have been
googling like crazy, but I can only seem to find really outdated or
unreliable info:

I am trying to build an extension module written in C++ on windows XP.
I am trying to use only open-source tools, such as mingw. I'm using
the Python 2.5 official, and it seems to compile my module just fine
(I'm using the --compiler=mingw32). I can also import the module. The
problem is, when I attempt to use it, I get a segfault. Now, I'm
pretty sure this segfault is just a bug in my C++ code. So of course,
I would like to debug this thing somehow. I tried using the mingw gdb
giving it my python.exe to run, but obviously this python has no debug
info, and wasn't even compiled with mingw. I was hoping it would still
somehow debug my extension module right, but when I do a backtrace
after it segfaults, I get nothing useful.

I've tried compiling python from source, and my extension module,
using MSVC8 (free express version), and I managed to get this to work.
The thing is, I don't want to have to recompile every single python
package I need (wxPython, SciPy, etc).

So basically, I need some general advice for how to compile and debug
extension modules on windows using only open-source tools. I am still
amazed that MSVC7.1 was chosen for the official python release and not
mingw, has anyone explained this?

Thank you so much for your time,
Chris Anderson



More information about the Python-list mailing list