LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   programming tools to aid C development (https://www.linuxquestions.org/questions/programming-9/programming-tools-to-aid-c-development-451159/)

irfanhab 06-03-2006 06:04 AM

programming tools to aid C development
 
Hi,

I wanted to ask about the popular tools to aid the development of C applications.
Tools which would allow me to avoid as much as possibe the infamous "Segementation Fault".
I've used gdb, ddd (gui frontend) but didnt find it of much use to track the causes of seg faults.

taylor_venable 06-03-2006 09:46 AM

I use gdb a lot for debugging C/C++ code, and it's probably the most flexible and powerful C/C++ debugger there is, although that means it's also pretty hard to use. The learning curve is high, but any time spent learning it will ultimately be worth it.

That aside, another useful tool for debugging C/C++ code would be a system-call tracer. On BSD systems, you've got ktrace available right out of the box; another good one is strace. I don't know if ktrace is available for Linux, but strace is available for both Linux and *BSD.

jim mcnamara 06-03-2006 10:07 AM

Tools:
Part of Linux - mtrace, electric fence
Other tools - splint, uno, clint, valgrind, gprof

You can google for tutorials, and if you don't have the tool, you can download and install it. For example, electric fence is normally just linked in to your executable. You run the code, it complains.


All times are GMT -5. The time now is 02:48 PM.