DBG$HELP.HLB  —  DEBUG  SET  TRACE  Examples
    1.DBG> SET TRACE SUB3

      This command causes the debugger to trace the beginning of
      routine SUB3 when that routine is executed.

    2.DBG> SET TRACE/BRANCH/CALL

      This command causes the debugger to trace every BRANCH
      instruction and every CALL instruction encountered during
      program execution.

    3.DBG> SET TRACE/LINE/INTO/NOSHARE/NOSYSTEM

      This command causes the debugger to trace the beginning of
      every source line, including lines in called routines (/INTO)
      but not in shareable image routines (/NOSHARE) or system
      routines (/NOSYSTEM).

    4.DBG> SET TRACE/NOSOURCE TEST5\%LINE 14 WHEN (X .NE. 2) DO (EXAMINE Y)

      This command causes the debugger to trace line 14 of module
      TEST5 when X is not equal to 2. At the tracepoint, the EXAMINE
      Y command is issued. The /NOSOURCE qualifier suppresses the
      display of source code at the tracepoint. The syntax of
      the conditional expression in the WHEN clause is language-
      dependent.

    5.DBG> SET TRACE/INSTRUCTION WHEN (X .NE. 0)

      This command causes the debugger to trace when X is not equal
      to 0. The condition is tested at each instruction encountered
      during execution. The syntax of the conditional expression in
      the WHEN clause is language-dependent.

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

      This command causes the debugger to trace the beginning of
      routine SUB2 during execution. At the tracepoint, the DO
      clause sets a watchpoint on variable K. The /SILENT qualifier
      suppresses the "trace . . . " message and the display of source
      code at the tracepoint. This example shows a convenient way
      of setting a watchpoint on a nonstatic (stack or register)
      variable. A nonstatic variable is defined only when its
      defining routine (SUB2, in this case) is active (on the call
      stack).

    7.DBG> SET TRACE/RETURN ROUT4 DO (EXAMINE X)

      This command causes the debugger to trace the return
      instruction of routine ROUT4 (that is, just before execution
      returns to the calling routine). At the tracepoint, the DO
      clause issues the EXAMINE X command. This example shows a
      convenient way of obtaining the value of a nonstatic variable
      just before execution leaves that variable's defining routine.

    8.DBG> SET TRACE/EVENT=TERMINATED

      This command causes the debugger to trace the point at which
      any task makes a transition to the TERMINATED state.
Close Help