Library /sys$common/syshlp/DBG$HELP.HLB  —  DEBUG  SET  WATCH  Description
    When an instruction causes the modification of a watchpoint
    location, the debugger takes the following actions:

    1. Suspends program execution after that instruction has
       completed execution.

    2. If you specified /AFTER when you set the watchpoint, checks
       the AFTER count. If the specified number of counts has not
       been reached, execution continues and the debugger does not
       perform the remaining steps.

    3. Evaluates the expression in a WHEN clause, if you specified
       one when you set the watchpoint. If the value of the
       expression is false, execution continues and the debugger
       does not perform the remaining steps.

    4. Reports that execution has reached the watchpoint location
       ("watch of . . . ") unless you specified /SILENT.

    5. Reports the old (unmodified) value at the watchpoint location.

    6. Reports the new (modified) value at the watchpoint location.

    7. Displays the line of source code at which execution is
       suspended, unless you specified /NOSOURCE or /SILENT when
       you set the watchpoint or entered a previous SET STEP NOSOURCE
       command.

    8. Executes the commands in a DO clause, if you specified one
       when you set the watchpoint. If the DO clause contains a GO
       command, execution continues and the debugger does not perform
       the next step.

    9. Issues the prompt.

    For high-level language programs, the address expressions you
    specify with the SET WATCH command are typically variable names.
    If you specify an absolute memory address that is associated
    with a compiler-generated type, the debugger symbolizes the
    address and uses the length in bytes associated with that type
    to determine the length in bytes of the watchpoint location. If
    you specify an absolute memory address that the debugger cannot
    associate with a compiler-generated type, the debugger watches 4
    bytes of memory (by default), beginning at the byte identified by
    the address expression. You can change this length, however, by
    setting the type to either WORD (SET TYPE WORD, which changes the
    default length to 2 bytes) or BYTE (SET TYPE BYTE, which changes
    the default length to 1 byte). SET TYPE LONGWORD restores the
    default length of 4 bytes.

    You can set a watchpoint on a range, for example,

    SET WATCH 30000:300018

    The debugger establishes a series of longword watches that cover
    the range.

    You can set watchpoints on aggregates (that is, entire arrays
    or records). A watchpoint set on an array or record triggers
    if any element of the array or record changes. Thus, you do not
    need to set watchpoints on individual array elements or record
    components. Note, however, that you cannot set an aggregate
    watchpoint on a variant record.

    You can also set a watchpoint on a record component, on an
    individual array element, or on an array slice (a range of array
    elements). A watchpoint set on an array slice triggers if any
    element within that slice changes. When setting the watchpoint,
    follow the syntax of the current language.
Close Help