[MMTK] Re: How to debug C code of MMTK?
Konrad Hinsen
hinsen@cnrs-orleans.fr
09 Apr 2002 22:42:42 +0200
"Andrei A. Korostelev" <korostel@chemmail.chem.fsu.edu> writes:
> Here is my question:
> How can I debug MMTK's C coded part? I have difficulty with debugging
> because all the commands are invoked using Python and there are no
> executables derived from C code.
I suspect that this depends on the operating system/compiler you are
using. Under Linux with gcc, you can simply run gdb on the Python
executable, then start your Python script and catch the segmentation
fault. That is how I debug MMTK C code.
If all else fails, you can link the MMTK C modules statically with the
Python interpreter, that approach should work on all platforms.
Unfortunately, this has become quite difficult with Python 2.2, as the
old extension module makefile (Misc/Makefile.pre.in in the
distribution) doesn't exist any more and the substitute (Distutils)
doesn't support static linking as far as I know. I recommend to switch
back to Python 2.1 in that case.
Konrad.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron | Fax: +33-2.38.63.15.17
45071 Orleans Cedex 2 | Deutsch/Esperanto/English/
France | Nederlands/Francais
-------------------------------------------------------------------------------