in reply to GDB journey into perl internals

I'm not a GDB expert either, and I have only a general knowledge of the perl internals, so what I do to catch these errors is to run the code through valgrind with increasing levels of verbosity until I get to the point where the errors start to make sense. (As usual, it really helps here if your code is split up in fairly small functions)

I usually don't go stepping through the code, since that takes a long time and is generally boring. I just throw in a lot of assert()s and log/warn marcros in my XS code on the suspicious parts. That way I can just compile with NDEBUG or not depending on if I'm developing or compiling production code.