Best way of debigging a C extension

Diez B. Roggisch deets at nospam.web.de
Fri Dec 12 00:03:25 CET 2008


Grant Edwards schrieb:
> On 2008-12-11, Diez B. Roggisch <deets at nospam.web.de> 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 it helps you much, as being inside the interpreter
>> & getting detailed information isn't your goal - you want to
>> see your extensions functions, what parameters they get and so
>> on.
> 
> It's probably a lot easier to just stick in a few printf()
> calls in key places...
> 

Easier than

$ gdb python
# set args myscript.py
# break some_function_of_mine


?


Diez



More information about the Python-list mailing list