Download AlphaFIX User`s Manual
Transcript
Chapter 3
Page 3-11
WATCH, WATCHB, WATCHW - SET DYNAMIC BREAKPOINTS
The three WATCH commands let you monitor memory locations and/or registers while
the program is running following a PROCEED command. If the watched location meets
the condition you specify, the program stops and the last instruction traced displays in
reduced intensity. A watch is also called a dynamic breakpoint.
The WATCH command has this format:
WATCH {register or location}{=value}
The WATCHB and WATCHW commands have the same format. The WATCH
command watches a longword of memory; WATCHB watches a byte; WATCHW
watches a word. Setting a watch for a register always watches a longword.
If you include only register or location, the program will stop whenever that register or
memory location changes value. If you also include =value, the program will stop only if
the register or location equals the value you enter. Here are some sample commands:
WATCH D0
WATCH SP=^S4D50
WATCHB 0(ABS)
WATCHW 200(PRG)=1
Breaks when D0 changes value.
Breaks when SP equals 4D50 hex.
Breaks when the byte at 0(ABS) changes.
Breaks when the word at 200(PRG) equals 1.
If you set a watch on an equality, you probably want to clear it after it breaks. Otherwise,
AlphaFIX will break on every instruction until the equality is no longer true.
If you enter a WATCH command without any argument, it displays the current watches
at the bottom of the screen where breakpoints are normally displayed. If a watch
caused a break, it has an arrow to its left.
You can set up to six watches at once.
To clear a watch, type the same command you used to set it.
PROCEED (or ^X) is the only function which enables watches. Since watch processing
traces every instruction, loop times can be very slow. For this reason, if anyone else is
using the computer, you shouldn’t use watches with a routine that JLOCKs the system.
You should never use watches with a routine which SVLOKs.
If you have subroutine mode set (^\), subroutines are executed full speed and the
watches are checked after the return. If a subroutine triggers a watch condition, the
subroutine call is highlighted.
Two control keys are available while you’re running a program with watches. Since
these are debugging keys, if you’re using the alternate terminal feature, they work only
on the primary debugging terminal. The two keys are:
AlphaFIX User’s Manual, Rev. 02