Computer Chess Club Archives


Search

Terms

Messages

Subject: hardware watchpoints

Author: Stuart Cracraft

Date: 12:33:45 07/26/04


My favorite debugging method is to note
the hashkey for a problem position that
appears in a game or wherever and then
do watch hashkey == 0xsomelargehexnumber
in GNU GDB.

The debugger then breaks at the point
where the hashkey first shows that
position, in makemove, after the hashkey
is updated. If there were multiple places
where the variable could become a certain
value, then it would be even more invaluable
and that can occur when memory is getting
smashed with bad index writes, etc.

I am then usually well in advance of any
good stuff and can step through to find
pathology.

I didn't do this before a suggestion on this
bboard to use if (hashkey == ....) { some noop command to
break on } but with the hardware watchpoint
it seems even more useful and less cumbersome.

Stuart



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.