segfault in extension module
Martin v. Löwis
martin at v.loewis.de
Mon Dec 1 01:47:42 EST 2003
Nathaniel Echols <echols at OCF.Berkeley.EDU> writes:
> How do I determine what is going wrong?
I recommend to run your code (or the interactive python) in a debugger.
For example, with gdb, you'd get
gdb /usr/bin/python
(gdb) run
>>> import foo
[program crashes]
(gdb) bt
The latter command will give a backtrace, which should tell you where
it crashes. If you don't get enough detail, make sure you compile your
module with debugging information. If you are on Windows, make then
sure that Python is compiled for debugging as well.
Regards,
Martin
More information about the Python-list
mailing list