Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Free Debuggers, Source Code Checkers, Bug Trackers

Author: David Rasmussen

Date: 11:14:09 02/13/02

Go up one level in this thread


On February 12, 2002 at 16:48:24, Dann Corbit wrote:

>http://www.thefreecountry.com/developercity/debuggers.shtml

Why are there so few tools for C++? I am missing at least a free lint-type tool
for C++, apart from more complex testing tools. Memory leak detecters are ok,
but there are other bugs than memory bugs in C++ programming, usually. One thing
(that I could do myself, and release, since nobody else has), is a collection of
"debug" simple types: classes behaving like ints, floats etc. but where certain
invariants could be checked (variable is always at least 0 and at most 8, say),
or "real" strongly typed typedefs instead of the mere aliases of C and C++. When
I do typedef int Piece, or enum Piece {...}, I would like to check that certain
invariants are holding, and maybe that only explicit casts from other types
(such as int) hold. One could easily make a debug enum type, where availability
of implicit/explicit casts could be controlled by the "user" (programmer), and
where certain invariants could be checked, as in: this enum variable is never
anything else but the explicitly declared constants: enum {RED,GREEN,BLUE} a; a
is always RED, GREEN or BLUE, never 42) etc.

Also, arrays that check out of bounds access could easily me made, again, for
use in debug builds. Why isn't all such things available already? I am too lazy
to do them... :) (actually, I do some of this in Chezzz, as I _hate_ bugs, and
do a lot to prevent them coming in the first place).

/David



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.