Library /sys$common/syshlp/dbg$help.hlb
DEBUG, SET, WATCH, Examples

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    1.DBG> SET WATCH MAXCOUNT

      This command establishes a watchpoint on the variable MAXCOUNT.

    2.DBG> SET WATCH ARR
      DBG> GO
           . . .
      watch of SUBR\ARR at SUBR\%LINE 12+8
         old value:
          (1):         7
          (2):         12
          (3):         3
         new value:
          (1):         7
          (2):         12
          (3):         28

      break at SUBR\%LINE 14
      DBG>

      In this example, the SET WATCH command sets a watchpoint on
      the three-element integer array, ARR. Execution is then resumed
      with the GO command. The watchpoint triggers whenever any array
      element changes. In this case, the third element changed.

    3.DBG> SET WATCH ARR(3)

      This command sets a watchpoint on element 3 of array ARR
      (Fortran array syntax). The watchpoint triggers whenever
      element 3 changes.

    4.DBG> SET WATCH P_ARR[3:5]

      This command sets a watchpoint on the array slice consisting
      of elements 3 to 5 of array P_ARR (Pascal array syntax). The
      watchpoint triggers whenever any of these elements change.

    5.DBG> SET WATCH P_ARR[3]:P_ARR[5]

      This command sets a separate watchpoint on each of elements
      3 to 5 of array P_ARR (Pascal array syntax). Each watchpoint
      triggers whenever its target element changes.

    6.DBG> SET TRACE/SILENT SUB2 DO (SET WATCH K)

      In this example, variable K is a nonstatic variable and is
      defined only when its defining routine, SUB2, is active (on
      the call stack). The SET TRACE command sets a tracepoint on
      SUB2. When the tracepoint is triggered during execution, the DO
      clause sets a watchpoint on K. The watchpoint is then canceled
      when execution returns from routine SUB2. The /SILENT qualifier
      suppresses the "trace . . . " message and the display of source
      code at the tracepoint.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.