Analysis Tools to help you in C development
I've just started learning C and I have a hard time finding bugs, memory leaks and the like. Which are good tools t开发者_高级运维o assist you in finding such things? I heard of Valgrind but are there others?
For me (on Linux) there are:
- GDB used to find bugs
- Valgrind find memory leaks
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.
精彩评论