Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: How to debug a segfault?

by perlmonkey (Hermit)
on Nov 19, 2003 at 16:09 UTC ( #308324=note: print w/ replies, xml ) Need Help??

in reply to How to debug a segfault?

You can use gdb to debug perl. It is not ideal, but when you have core dumps it should help.

# start gdb gdb /usr/bin/perl # inside gdb run the script run # after it segv's get the stack trace bt
You can inspect the c data that was in memory at the time of the segv and probably figure out what caused the core dump. See the gdb man page for more details.

Comment on Re: How to debug a segfault?
Download Code
Replies are listed 'Best First'.
Re: How to debug a segfault?
by Abigail-II (Bishop) on Nov 19, 2003 at 16:31 UTC
    If you want to debug a segfault (or a memory leak) in perl itself, I like to use valgrind. It's popular on p5p as well.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://308324]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-11-29 03:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls