HELPLIB.HLB  —  DEBUG  Examples
    1.$ FORTRAN/DEBUG/NOOPTIMIZE WIDGET
      $ LINK/DEBUG WIDGET
      $ RUN WIDGET

                      [ Debugger Banner and Version ]

      %DEBUG-I-INITIAL, language is FORTRAN, module set to WIDGET
      DBG>

      The FORTRAN and LINK commands both specify the /DEBUG qualifier
      to compile the program WIDGET.FOR with debugger symbol table
      information. Because the program has been compiled and linked
      with debug information, the debugger is automatically invoked
      by the image activator upon starting the program with the
      RUN command. No program code has yet been executed when the
      debugger is invoked.

    2.$ FORTRAN/DEBUG/NOOPTIMIZE WIDGET
      $ LINK/DEBUG WIDGET
      $ RUN/NODEBUG WIDGET

        NAME:
        NAME:
        NAME:
      ^Y
      $ DEBUG/RESUME

                   [ Debugger Banner and Version ]

        %DEBUG-I-INITIAL, language is FORTRAN, module set to WIDGET
        DBG>

      The FORTRAN and LINK commands both specify the /DEBUG qualifier
      to compile the program WIDGET.FOR with debugger symbol table
      information. The RUN command begins execution of the image
      WIDGET.EXE, which loops uncontrollably. Ctrl/Y interrupts the
      program, and the DEBUG/RESUME command gives control to the
      debugger.

    3.$ CC/DEBUG/NOOPTIMIZE ECHOARGS
      $ LINK/DEBUG ECHOARGS
      $ ECHO == "$ sys$disk:[]echoargs.exe"
      $ DEBUG/KEEP

                         [ Debugger Banner and Version ]

      DBG> RUN/COMMAND="ECHO"/ARGUMENTS="fa sol la mi"
      %DEBUG-I-INITIAL, language is C, module set to ECHOARGS
      %DEBUG-I-NOTATMAIN, type GO to get to start of main program
      DBG>
         .
         .
         .
      DBG> RERUN/ARGUMENTS="fee fii foo fum"
      %DEBUG-I-INITIAL, language is C, module set to ECHOARGS
      %DEBUG-I-NOTATMAIN, type GO to get to start of main program
      DBG>
         .
         .
         .
      DBG> RUN/ARGUMENTS="a b c" ECHOARGS
      %DEBUG-I-INITIAL, language is C, module set to ECHOARGS
      %DEBUG-I-NOTATMAIN, type GO to get to start of main program
      DBG>

      The CC and LINK commands both specify the /DEBUG qualifier
      to compile the program ECHOARGS.C with debugger symbol table
      information.

      The symbol definition command defines a foreign command for use
      during the debugging session.

      The DEBUG/KEEP command invokes the kept debugger.

      The first RUN command uses the /COMMAND qualifier to specify
      a foreign command to invoke the image file and the /ARGUMENTS
      qualifier to specify a string of arguments.

      The RERUN command reinvokes the same image file and uses the
      /ARGUMENTS qualifier to specify a new string of arguments.

      The second RUN command specifies a new image file and a new
      string of arguments.

      On Integrity server systems, start the Heap Analyzer within the
      kept debugger:

    4.$ debug/keep
      DBG> run/heap 8queens

      or, alternately:

    5.$ debug/keep
      DBG> run 8queens
       .
       .
       .
      DBG> deactivate break/all
      DBG> deactivate watch/all
      DBG> deactivate trace/all
      DBG> start heap_analyzer
      DBG> activate break/all
      DBG> activate watch/all
      DBG> activate trace/all

      Using this method, you must first deactivate all watchpoints,
      breakpoints, and tracepoints before starting the heap analyzer
      with the START HEAP_ANALYZER command. This procedure prevents
      a potential race condition from occurring. After starting the
      heap analyzer, re-activate the breakpoints, watchpoints, and
      trace points.

      On Alpha systems, start the Heap Analyzer within the kept
      debugger:

    6.$  debug/keep
      DBG> run/heap 8queens

    7.$ DEBUG/SERVER=(PROTOCOLS=(TCP_IP,DECNET))

      %DEBUG-I-SPEAK: TCP/IP: YES, DECnet: YES, UDP: NO
      %DEBUG-I-WATCH: Network Binding: ncacn_ip_tcp:16.32.16.25[1112]
      %DEBUG-I-WATCH: Network Binding: ncacn_dnet_nsp:63.1004[RPC20A020DD0001]
      %DEBUG-I-AWAIT: Ready for client connection...

      The DEBUG/SERVER command establishes a connection to the debug
      server, requesting network protocols TCP/IP and DECnet. Note
      that the binding strings are saved in file TEMP.TMP. You can
      use the TYPE command to display the contents of TEMP.TMP.
Close Help