in reply to XS Debugging segmentation faults
Here's how to do some of this with gdb on Linux, YMMV for other debuggers:
It is my experience that this usually puts me well on the way of finding the exact bug: at the least it shows you where to look.$ 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 func +tion (gdb) print variable ... prints variable, amazingly (supposing it is in scope) (gdb) print *0xdeadbeef ... prints memory address contents (best guess at what it contains)
Good luck!
Update: added asterisk before Oxdeadbeef.
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: XS Debugging segmentation faults
by shotgunefx (Parson) on Jan 29, 2003 at 21:30 UTC | |
|
Re: Re: XS Debugging segmentation faults
by shotgunefx (Parson) on Jan 29, 2003 at 22:17 UTC |