Hi Monks,

I just had to share this with you. I use Komodo as my main development and debugging tool. It does some things really nicely, but some other things it doesn't do so well: such as crash handling.

Although I have liberal sprinklings of defensive programming, and of course use strict and use warn everywhere, sometimes I still get segmentation faults with no error messages and nothing to indicate even the line of code. I was generally beginning to doubt both my capacity as a programmer and the stability of the tools I was running.

Then I found valgrind.

Valgrind is my new love. If I type valgrind perl ./thingy.pl at the command line, although it runs painfully slowly, when I get a crash, I get a delightfully summarised stack-dump giving me chapter and verse on my crash.

I now sleep peacefully at night, my wife and children have found a new, charming and relaxed husband/dad and everything is peaceful in the household.

If you haven't tried it and code stability is a problem, have a go.

If there is something better, then I'd love to hear about it.

Peace and Love.

Steve


In reply to Valgrind perl ./thingy.pl by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.