Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best debugging tool for C and C++ [closed]

Tags:

c

debugging

I am working on C/C++ on UNIX and have often seen core files. Many times the core files are difficult to debug to find the actual cause of core or the segmentation fault. Could you please suggest me an efficient debugger?

like image 798
Sachin Chourasiya Avatar asked Nov 01 '10 18:11

Sachin Chourasiya


1 Answers

For segmentation faults, memory leaks, uninitialized data and such, running your program through valgrind is always a good idea. If you are especially interested in memory leaks, the option "--leak-check=full" pays off.

And yes, learn gdb. It takes a little time, but it's worth it.

like image 116
Tilman Vogel Avatar answered Oct 01 '22 07:10

Tilman Vogel