Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Help with Release/Debug

Author: William Bryant

Date: 16:59:05 06/13/99

Go up one level in this thread


On June 13, 1999 at 18:11:14, James Robertson wrote:

>On June 13, 1999 at 14:04:21, J. Wesley Cleveland wrote:
>
>>On June 13, 1999 at 13:00:35, James Robertson wrote:
>>
>>[snip]
>>>My question is: could someone please provide me with some debug/release theory
>>>under MSVC and what the differences are? It might really help me discover where
>>>the other two bugs are.
>>>
>>
>>I am not at work, but IIRC, the main difference is that debug zeros all
>>unitialized memory. It also has many facilities for debugging errors with
>>allocated memory, e.g. out of bounds writes, using freed memory, not freeing all
>>memory. Browse through the help system under debugging and see what you find (or
>>wait until someone gives a better answer).
>
>Is there any way to get the debygger to issue warnings if an array read/write
>exceeds it's bounds?
>
>James

I found several hard to trace bugs by adding range checking to my arrays.  Yes
it slows the program down a very little but, but prevents unexpected behavior.

If you are using C++, the array class has automatic range checking.

I am using different tools (Metrowerks Codewarrior) so this may not apply.  When
you crash while in the debugger, does the debugger show you the line that
generated the illegal instuction/memmory access fault.  The debugger should be
able to tell you the state of the local/global variables.  This may indicate
which index is falling out of bounds.

William
wbryant@ix.netcom.com




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.