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
Are there better techniques for debugging this kind of perl module? If so, what do you use? What tools or options should i be considering and reading up on?