Best way of debigging a C extension

Christian Heimes lists at cheimes.de
Fri Dec 12 00:48:43 CET 2008


Diez B. Roggisch schrieb:
> I never tried this on windows - but what happens if you start python
> inside GDB, and then set breakpoints inside your extension?
> 
> This works flawlessly for me under *nix.
> 
> The debug-build of python isn't needed for this - and I doubt a bit that
> it helps you much, as being inside the interpreter & getting detailed
> information isn't your goal - you want to see your extensions functions,
> what parameters they get and so on.

It doesn't work well with all debugging symbols stripped and with -O2
optimized code. The compiler rearranges the code. You could try to
compile your own code with different compiler arguments. I don't know if
 that's easily possible on Windows with Python 2.5.

Christian




More information about the Python-list mailing list