thanks! I have the debug package for libgcrypt already (libgcrypt11-dbg on debian), but didn't have perl-debug installed yet. i'm installing it now and i'll poke around in it to see what's available to me there.
my problem at the moment is not a memory issue, so valgrind's not needed right now, but i'll keep that for future reference.
how do you suggest i look at the stack traces or trace calls across perl/C boundaries other than what i've been doing so far? is there some other trick beyond what i'm currently doing? the approach i described above feels kludgy to me, but maybe i'm just not used to it enough yet.