Re: Best way of debigging a C extension

2008-12-13 Thread Paul Moore
On 11 Dec, 23:57, Christian Heimes wrote: > Paul Moore schrieb: > > That's what I thought. I was just hoping that using a debug build of > > an extension would be usable with a standard release build of Python, > > as that's what will be easy for most people to set up. > > A debug build changes la

Re: Best way of debigging a C extension

2008-12-11 Thread Diez B. Roggisch
Christian Heimes schrieb: 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

Re: Best way of debigging a C extension

2008-12-11 Thread Christian Heimes
Paul Moore schrieb: > The trouble is, I only have mingw to build extensions, not MSVC7.1 - > so I can't build Python (and I don't know if I still have the toolkit > compiler to build with that - I certainly don't have all the pieces > installed). With Python 2.6, I guess things will be better as I

Re: Best way of debigging a C extension

2008-12-11 Thread Christian Heimes
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 m

Re: Best way of debigging a C extension

2008-12-11 Thread Diez B. Roggisch
Grant Edwards schrieb: On 2008-12-11, Diez B. Roggisch wrote: 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 doub

Re: Best way of debigging a C extension

2008-12-11 Thread Grant Edwards
On 2008-12-11, Diez B. Roggisch wrote: > 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

Re: Best way of debigging a C extension

2008-12-11 Thread Diez B. Roggisch
Paul Moore schrieb: I'm writing a C extension. My environment is Python 2.5, with the mingw compiler, on Windows XP. At the moment I'm debugging by scattering printf() statements around, but it's not always easy. Is there a better way of debugging - particularly for diagnosing crashes? I have gd

Re: Best way of debigging a C extension

2008-12-11 Thread Paul Moore
On 11 Dec, 21:57, Christian Heimes wrote: > You have to build Python on your own to get debug builds. Only debug > builds allow to do extension debugging like memory leak finding. The trouble is, I only have mingw to build extensions, not MSVC7.1 - so I can't build Python (and I don't know if I s

Re: Best way of debigging a C extension

2008-12-11 Thread Christian Heimes
Paul Moore wrote: I have gdb (although I've hardly used it, but I can learn :-)) but if I try building my extension with python setup.py build --debug, I get an error because -lpython25_d does not exist. I'm not surprised by this, as I don't have a debug build of Python - but that should be OK, I

Re: Best way of debigging a C extension

2008-12-11 Thread Miki
Hello Paul, > I'm writing a C extension. My environment is Python 2.5, with the > mingw compiler, on Windows XP. At the moment I'm debugging by > scattering printf() statements around, but it's not always easy. Is > there a better way of debugging - particularly for diagnosing crashes? No guarante

Best way of debigging a C extension

2008-12-11 Thread Paul Moore
I'm writing a C extension. My environment is Python 2.5, with the mingw compiler, on Windows XP. At the moment I'm debugging by scattering printf() statements around, but it's not always easy. Is there a better way of debugging - particularly for diagnosing crashes? I have gdb (although I've hardl