[Pythonmac-SIG] Debugging Extensions on Mac
Gustavo Tabares
gustabares at verizon.net
Wed Sep 6 20:41:15 CEST 2006
Hello all,
Sorry if this isn't the right forum for this, but I have been searching
Google for a couple days without finding any close answers.
I am trying to debug Python extensions on the Mac. I am already able to
compile/link both debug and release versions of my extension using both
Xcode and distutils. The extension fully works in Release mode. I copied
down the source for Python-2.4.3 and made a debug version of the Python
interpreter.
The problem comes when I try to import the debug version of my extension
in the debug Python interpreter. I get the following:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Failure linking new module: extension.so: Symbol not found:
_Py_InitModule4
Referenced from: extension.so
Expected in: dynamic lookup
I'm trying to avoid debugging using printfs because this can get tedious
when working with complex code. This particular extension above doesn't
really do much of importance except read/write a file, but I made it for
testing purposes.
Anyone have any experience stepping through Python extension code on Mac
and have seen this?
Thanks,
Gustavo
More information about the Pythonmac-SIG
mailing list