$ gdb -c core /usr/local/bin/perl [snip] (gdb) set args my_test_script.pl (gdb) run ...something about segfaulting (gdb) where ... shows what function you were in (gdb) bt ... shows a backtrace of the stack, showing the code path to this function (gdb) print variable ... prints variable, amazingly (supposing it is in scope) (gdb) print *0xdeadbeef ... prints memory address contents (best guess at what it contains)