문제

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?

도움이 되었습니까?

해결책

For me (on Linux) there are:

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top