Hey Gambit (or another programmer)

Come in! Have a margarita or root beer? How about some fresh trout? :)

Moderator: Moderators

Post Reply
XMEN Ashaman DTM
Inmate
Posts: 2369
Joined: Mon Oct 02, 2000 12:09 am
Location: Silverdale, WA

Hey Gambit (or another programmer)

Post by XMEN Ashaman DTM »

Is there a program or script that can look over C code to verify if it has bugs in it? Say something like Borland's or MS's debuggers, but for free?<br><br> <p></p><i></i>
User avatar
XMEN Gambit
Site Admin
Posts: 4122
Joined: Thu Nov 18, 1999 12:00 am

Re: Hey Gambit (or another programmer)

Post by XMEN Gambit »

<!--EZCODE QUOTE START--><blockquote><strong><em>Quote:</em></strong><hr>Is there a program or script that can look over C code to verify if it has bugs in it?<hr></blockquote><!--EZCODE QUOTE END--><br><br>Heh. Technically, the answer to your question is "a compiler," because the syntax is checked before/during the first pass through the code. gcc is the most used free compiler that I know of. But the rest of your question sounds like you're looking for a debugger, where you can check values of variables while the program is running, and step through the executing code line-by-line.<br><br>I found these answers online:<br><!--EZCODE HR START--><hr /><!--EZCODE HR END--><br>"The gdb (GNU debugger) is just what you are looking for.<br>If you prefer a GUI kind of debugger, then consider ddd -- which is a GUI front end that runs gdb in the behind the scenes."<br><br>also<br><br>"There`s xgdb, an X front-end to gdb. Gdb is very powerful, though, and definitely worth the learning curve."<br><!--EZCODE HR START--><hr /><!--EZCODE HR END--><br><br>You may wonder why I only point to Linux stuff here. (Well, I think Cygwin lets you run gcc and simple xwindows stuff under windows.) But really, something should have come with the compiler you're using - like the one MS ships with VC++ or Intel ships with theirs - so I figured you must be using something other than a big commercial compiler, and naturally I thought of gcc.<br><br>If you truly are looking for a simple syntax checker, most of the "programmer's editors" available do syntax checking and highlighting while you type. Visual SlickEdit does, UltraEdit can, and so on.<br> <p><!--EZCODE IMAGE START--><img src="http://www.xmenclan.org/xmengambit.gif"/><!--EZCODE IMAGE END--><br>XMEN member<br>Card-carrying DTM<br>OKL Fish-napper<br><br>Though a program be but three lines long, someday it will have to be maintained.<br><!--EZCODE ITALIC START--><em> The Tao of Programming</em><!--EZCODE ITALIC END--></p><i></i>
Image
XMEN Ashaman DTM
Inmate
Posts: 2369
Joined: Mon Oct 02, 2000 12:09 am
Location: Silverdale, WA

Re: Hey Gambit (or another programmer)

Post by XMEN Ashaman DTM »

Thanks!<br> <p></p><i></i>
Post Reply