CygWin .pyd oddities

Gerhard Häring gerhard.nospam at bigfoot.de
Tue Aug 21 18:42:55 CEST 2001


On 21 Aug 2001 16:00:06 GMT, Matthew Turk <m-turk at nwu.edu> wrote:
>[...]
>I would like to know if there's a method of
>debugging a C extension in python.

This is what I have done recently:
- write a setup.py file for the extension
- python setup.py build --debug [--compiler=mingw32]
- gdb /path/to/python/python.exe
- run
- import and run the test module

gdb then stops at the point where the extension module crashed and you can
inspect callstack, local variables and all the rest. "gdb" calls a nice GUI
debugger on Cygwin btw.

HTH,

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list