dkg has asked for the wisdom of the Perl Monks concerning the following question:
hey good people--
I'm trying to debug problems with Crypt::GCrypt -- a module which is effectively a wrapper around a C library.
I find the debugging process difficult and confusing in this scenario -- the source that i've got is the .xs file, which i can't get either the perl debugger or gdb to treat as "source". So far i've figured out the following two (suboptimal) techniques for dealing with problems i encounter:
- i step through a test script with perl -d t/00-test.t, and attach to the process with gdb after the first line. I insert breakpoints based on the generated .c file to try to get more information about the internal state of the system
- i write a test C program that does (what i think is) the same thing as the perl program, and step through that, and try to guess at a good analogy of what's happening
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: debugging perl bindings on a C library
by Joost (Canon) on Oct 22, 2009 at 21:02 UTC | |
by salva (Canon) on Oct 22, 2009 at 23:34 UTC | |
by dkg (Acolyte) on Oct 22, 2009 at 22:17 UTC | |
by Joost (Canon) on Oct 22, 2009 at 23:37 UTC |
Back to
Seekers of Perl Wisdom