Question

I've just started learning C and I have a hard time finding bugs, memory leaks and the like. Which are good tools to assist you in finding such things? I heard of Valgrind but are there others?

Was it helpful?

Solution

For me (on Linux) there are:

OTHER TIPS

If you're allocating memory dynamically your programs are probably already too complex for it to do a really good job, but you may be amused by the value analysis in Frama-C. Take a look at the tutorialet and move up to the tutorial chapter in the manual if you are still interested.

lint is the classic C static analysis tool.

I suspect they cost more than you’re willing to pay, but both Coverity and Klocwork do serious checking for memory leaks, along with lots of other things.

Valgrind catches a lot of memory errors. It misses a variety, too, such as access outside of a local array. Our CheckPointer tool will catch virtually all types of bad memory references at the moment the error is made. See the comparison table at the web page to see more things Valgrind won't catch that CheckPointer will.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top