Marc's Place

DIBIOL/DBL - Debugging

DIBOL programs may be debugged by using either DDT, (the DIBOL Debugging Tool), or
DEBUG (the VAX symbolic debugger).

Each routine to be debugged must be compiled using the /DEBUG qualifier with the
appropriate debugger specified, either /DEBUG=DDT or /DEBUG=NATIVE.

The image file must be linked using the /DEBUG switch. If DEBUG is to be used, the
LINK command should be specified as follows:

       $ LINK/DEBUG progname {,other files if any}

A sample DEBUG initialization file is provided as part of DIBOL. DEBUG executes the
initialization file pointed to by the logical name DBG$INIT.  To define the logical
name to point to the DIBOL sample initialization file, enter the following DCL command:

       $ DEFINE DBG$INIT SYS$EXAMPLES:DBLDBGINI.COM

If DDT is to be used, the LINK command should be specified as follows:

       $ LINK/DEBUG=SYS$SYSTEM:DBLDDT  progname {,other files is any}


Commands

The following commands are available while debugging a DIBOL program using DDT (DIBOL
Debugging Tool).


 Single step

To 'step' to the next line, enter either a CTRL/G or a STEP command. CTRL/G is echoed
as "STEP".  STEP may be abbreviated to S, and must be followed by a RETURN.
STEP must be used when the DCL command line editor is in use.


 Continue

To continue execution, enter either a CTRL/Z or a GO command. CTRL/Z is echoed as "GO".
GO may be abbreviated to G, and must be followed by a RETURN.


 Set Breakpoint

To set a breakpoint, enter a dollar sign ($), optionally followed by a module name and
a colon, followed by the line number.  For instance,

          $123          sets a breakpoint at line 123 in the current module.
          $ABC:123      sets a breakpoint at line 123 in module ABC.


 Clear Breakpoint

To clear a breakpoint in the current module, simply enter a dollar sign ($).  To clear
a breakpoint in a module other than the current one, enter a dollar sign ($) followed
by the module name.

          $             clears the breakpoint in the current module.
          $ABC          clears the breakpoint in module ABC.


 Skip Breakpoint

To skip a breakpoint a specified number of times, enter a right angle bracket (>),
followed by the number of times you wish the breakpoint to be skipped.  Only the
breakpoint for the current routine is affected.


 Examine variable

To examine a variable in the current module, enter the variable name, followed by an
equals sign (=).  Variables in the current calling chain may be examined by entering
a plus sign (+) for each level of calls.

          XYZ=        examines the variable XYZ in the current routine.
          +XYZ=       examines the variable XYZ in the routine which called the current
                      routine.
          ++XYZ=      examines the variable XYZ in the routine which called the routine
                      which called the current routine.

Enter an equals sign with no variable to examine the most recently accessed variable.


 Change variable

To change a variable in the current module, enter the variable name, an equals sign
(=), and the value.  To change variables in the current calling chain, enter a plus
sign (+) for each level of calls, as for examining variables.  To clear a variable,
enter a space after the equals sign. No string delimiters are necessary.

          XYZ=ABC          sets the variable XYZ to the characters ABC.
          XYZ=<space>      sets the variable XYZ to all spaces.
          DEF=123          sets the decimal variable DEF to the value 123.
          DEF=<space>      sets the decimal variable DEF to the value zero.


 Subroutine traceback

To obtain a listing of the current calling chain, enter a circumflex (^) (Shift/6).


 Show open channels

To obtain a listing of all currently open I/O channels, enter /CHANNELS.
/CHANNELS may be abbreviated to /C.


 Show breakpoints

To obtain a listing of all currently set breakpoints, enter /BREAKPOINTS.
/BREAKPOINTS may be abbreviated to /B.


 Show routines

To obtain a listing of all routines within the image, enter /ROUTINES.
/ROUTINES may be abbreviated to /R.


 Exit

To exit from DDT, enter /QUIT.  /QUIT may be abbreviated to /Q.


 Help

To obtain help on DDT, enter a question mark (?).
© 1997- Marc Vos (and others) Contact Me