[Digital logo]
[HR]

OpenVMS Debugger Manual


Previous | Contents

If the debugger cannot symbolize the address, a message is displayed.

Related commands:


Examples

#1
DBG> SYMBOLIZE %R5
address PROG\%R5: 
    PROG\X
DBG>

This example shows that the local variable X in routine PROG is located in register R5.

#2
DBG> SYMBOLIZE %HEX 27C9E3
address 0027C9E3: 
    MOD5\X
DBG>

This command directs the debugger to treat the integer literal 27C9E3 as a hexadecimal value and convert that address to a symbolic representation, if possible. The address converts to the symbol X in module MOD5.


SYNCHRONIZE VECTOR_MODE (VAX only)

Forces immediate synchronization between the scalar and vector processors.

Applies to VAX vectorized programs.


Format

SYNCHRONIZE VECTOR_MODE


DESCRIPTION

The SYNCHRONIZE VECTOR_MODE command forces immediate synchronization between the scalar and vector processors by issuing SYNC and MSYNC instructions. The effect is as follows:

Entering the SYNCHRONIZE VECTOR_MODE command is equivalent to issuing SYNC and MSYNC instructions at the location in the program at which execution is suspended.

By default, the debugger does not force synchronization between the scalar and vector processors during program execution (SET VECTOR_MODE NOSYNCHRONIZED). To force such synchronization, use the SET VECTOR_MODE SYNCHRONIZED command.

Related commands:


Examples

#1
DBG> SYNCHRONIZE VECTOR_MODE
%DEBUG-I-SYNCREPCOM, Synchronize reporting complete

This command forces immediate synchronization between the scalar and vector processors. In this example, the diagnostic message indicates that the synchronization operation has completed and that all pending vector exceptions have been delivered and reported.

#2
DBG> STEP   (1)
stepped to .MAIN.\SUB\%LINE 99 
    99:         VVDIVD  V1,V0,V2
DBG> STEP   (2)
stepped to .MAIN.\SUB\%LINE 100 
   100:         CLRL    R0
DBG> EXAMINE/FLOAT %V2   (3)
0\%V2 
    [0]:  13.53400 
    [1]:  Reserved operand, encoded as floating divide by zero 
    [2]:  247.2450
    ...
DBG> SYNCHRONIZE VECTOR_MODE   (4)
%SYSTEM-F-VARITH, vector arithmetic fault, summary=00000002, 
                  mask=00000004, PC=000002E1, PSL=03C00010 
break on unhandled exception preceding .MAIN.\SUB\%LINE 100
   100:         CLRL    R0) 
DBG>
 

The comments that follow refer to the callouts in the previous example:

  1. This STEP command suspends program execution on line 99, just before a VVDIVD instruction is executed. Assume that, in this example, the instruction will trigger a floating-point divide-by-zero exception.
  2. This STEP command executes the VVDIVD instruction. Note, however, that the exception is not delivered at this point in the execution of the program.
  3. The EXAMINE/FLOAT command displays a decoded exception message in element 1 of the destination register, V2. This confirms that a floating-point divide-by-zero exception was triggered and is pending delivery.
  4. The SYNCHRONIZE VECTOR_MODE command forces the immediate delivery of the pending vector exception.

TYPE

Displays lines of source code.

Format

TYPE [[module-name\]line-number[:line-number]
[,[module-name\]line-number[:line-number][,...]]]


PARAMETERS

module-name

Specifies the module that contains the source lines to be displayed. If you specify a module name along with the line numbers, use standard path-name notation: insert a backslash (\) between the module name and the line numbers.

If you do not specify a module name, the debugger uses the current scope (as established by a previous SET SCOPE command, or the PC scope if you did not enter a SET SCOPE command) to find source lines for display. If you specify a scope search list with the SET SCOPE command, the debugger searches for source lines only in the module associated with the first named scope.

line-number

Specifies a compiler-generated line number (a number used to label a source language statement or statements).

If you specify a single line number, the debugger displays the source code corresponding to that line number.

If you specify a list of line numbers, separating each with a comma, the debugger displays the source code corresponding to each of the line numbers.

If you specify a range of line numbers, separating the beginning and ending line numbers in the range with a colon (:), the debugger displays the source code corresponding to that range of line numbers.

You can display all the source lines of a module by specifying a range of line numbers starting from 1 and ending at a number equal to or greater than the largest line number in the module.

After displaying a single line of source code, you can display the next line of that module by entering a TYPE command without a line number (that is, by entering TYPE and then pressing the Return key). You can then display the next line and successive lines by repeating this sequence, in effect, reading through your source program one line at a time.


DESCRIPTION

The TYPE command displays the lines of source code that correspond to the specified line numbers. The line numbers used by the debugger to identify lines of source code are generated by the compiler. They appear in a compiler-generated listing and in a screen-mode source display.

If you specify a module name with the TYPE command, the module must be set. Use the SHOW MODULE command to determine whether a particular module is set. Then use the SET MODULE command, if necessary.

In screen mode, the output of a TYPE command is directed at the current source display, not at an output or DO display. The source display shows the lines specified and any surrounding lines that fit in the display window.

Related commands:


Examples

#1
DBG> TYPE 160
module COBOLTEST 
   160: START-IT-PARA.
DBG> TYPE
module COBOLTEST 
   161:         MOVE SC1 TO ES0.
DBG>

In this example, the first TYPE command displays line 160, using the current scope to locate the module containing that line number. The second TYPE command, entered without specifying a line number, displays the next line in that module.

#2
DBG> TYPE 160:163
module COBOLTEST 
   160: START-IT-PARA. 
   161:         MOVE SC1 TO ES0. 
   162:         DISPLAY ES0. 
   163:         MOVE SC1 TO ES1.
DBG>

This command displays lines 160 to 163, using the current scope to locate the module.

#3
DBG> TYPE SCREEN_IO\7,22:24

This command displays line 7 and lines 22 to 24 in module SCREEN_IO.


WHILE

Executes a sequence of commands while the language expression (Boolean expression) you have specified evaluates as true.

Format

WHILE Boolean-expression DO (command[;...])


PARAMETERS

Boolean-expression

Specifies a language expression that evaluates as a Boolean value (true or false) in the currently set language.

command

Specifies a debugger command. If you specify more than one command, separate the commands with semicolons (;). At each execution, the debugger checks the syntax of any expressions in the commands and then evaluates them.

DESCRIPTION

The WHILE command evaluates a Boolean expression in the current language. If the value is true, the command list in the DO clause is executed. The command then repeats the sequence, reevaluating the Boolean expression and executing the command list until the expression is evaluated as false.

If the Boolean expression is false, the WHILE command terminates.

Related commands:


Example

DBG> WHILE (X .EQ. 0) DO (STEP/SILENT)

This command directs the debugger to keep stepping through the program until X no longer equals 0 (Fortran example).


Appendix A
Predefined Key Functions

When you start the debugger, certain predefined functions (commands, sequences of commands, and command terminators) are assigned to keys on the numeric keypad, to the right of the main keyboard. By using these keys you can enter certain commands with fewer keystrokes than if you were to type them at the keyboard. For example, pressing the COMMA key (,) on the keypad is equivalent to typing GO and then pressing the Return key. Terminals and workstations that have an LK201 keyboard have additional programmable keys compared to those on VT100 keyboards (for example, "Help" or "Remove"), and some of these keys are also assigned debugger functions.

To use function keys, keypad mode must be enabled (SET MODE KEYPAD). Keypad mode is enabled when you start the debugger. If you do not want keypad mode enabled, perhaps because the program being debugged uses the keypad for itself, you can disable keypad mode by entering the SET MODE NOKEYPAD command.

The keypad key functions that are predefined when you start the debugger are identified in summary form in Figure A-1. Table A-1, Table A-2, Table A-3, and Table A-4 identify all key definitions in detail. Most keys are used for manipulating screen displays in screen mode. To use screen mode commands, you must first enable screen mode by pressing the PF3 key (SET MODE SCREEN). In screen mode, to re-create the default layout of various windows, press the keypad key sequence BLUE-MINUS (PF4 followed by the MINUS key (--)).

To use the keypad keys to enter numbers rather than debugger commands, enter the command SET MODE NOKEYPAD.

Figure A-1 Keypad Key Functions Predefined by the Debugger---Command Interface



A.1 DEFAULT, GOLD, BLUE Functions

A given key typically has three predefined functions:

In Figure A-1, the DEFAULT, GOLD, and BLUE functions are listed within each key's outline, from top to bottom respectively. For example, pressing keypad key KP0 enters the command STEP (DEFAULT function); pressing PF1 and then KP0 enters the command STEP/INTO (GOLD function); pressing PF4 and then KP0 enters the command STEP/OVER (BLUE function).

All command sequences assigned to keypad keys are terminated (executed immediately) except for the BLUE functions of keys KP2, KP4, KP6, and KP8. These unterminated commands are symbolized with a trailing ellipsis (...) in Figure A-1. To terminate the command, supply a parameter and then press Return. For example, to scroll down 12 lines:

  1. Press the PF4 key.
  2. Press keypad key KP2.
  3. Type :12 at the keyboard.
  4. Press the Return key.

A.2 Key Definitions Specific to LK201 Keyboards

Table A-1 lists keys that are specific to LK201 keyboards and do not appear on VT100 keyboards. For each key, the table identifies the equivalent command and, for some keys, an equivalent keypad key that you can use if you do not have an LK201 keyboard.

Table A-1 Key Definitions Specific to LK201 Keyboards
LK201 Key Command Sequence Invoked Equivalent
Keypad Key
F17 SET KEY/STATE=DEFAULT None
F18 SET KEY/STATE=MOVE None
F19 SET KEY/STATE=EXPAND None
F20 SET KEY/STATE=CONTRACT None
Help HELP KEYPAD SUMMARY None
Next Screen SCROLL/DOWN KP2
Prev Screen SCROLL/UP KP8
Remove DISPLAY/REMOVE %CURSCROLL None
Select SELECT/SCROLL %NEXTSCROLL KP3

A.3 Keys that Scroll, Move, Expand, Contract Displays

By default, keypad keys KP2, KP4, KP6, and KP8 scroll the current scrolling display. Each key controls a direction (down, left, right, and up, respectively). By pressing F18, F19, or F20, you can place the keypad in the MOVE, EXPAND, or CONTRACT states. When the keypad is in the MOVE state, you can use KP2, KP4, KP6, and KP8 to move the current scrolling display down, left, and so on. Similarly, in the EXPAND and CONTRACT states, you can use the four keys to expand or contract the current scrolling display. (See Figure A-1 and Table A-2. Alternative key definitions for VT100 keyboards are described later in this section.)

To scroll, move, expand, or contract a display:

  1. Press KP3 repeatedly, as needed, to select the current scrolling display from the display list.
  2. Press F17, F18, F19, or F20 to put the keypad in the DEFAULT (scroll), MOVE, EXPAND, or CONTRACT state, respectively.
  3. Press KP2, KP4, KP6, and KP8 to do the desired function. Use the PF1 (GOLD) and PF4 (BLUE) keys to control the amount of scrolling or movement.

Table A-2 Keys that Change the Key State
Key Description
PF1 Invokes the GOLD function of the next key you press.
PF4 Invokes the BLUE function of the next key you press.
F17 Puts the keypad in the DEFAULT state, enabling the scroll-display functions of KP2, KP4, KP6, and KP8. The keypad is in the DEFAULT state when you invoke the debugger.
F18 Puts the keypad in the MOVE state, enabling the move-display functions of KP2, KP4, KP6, and KP8.
F19 Puts the keypad in the EXPAND state, enabling the expand-display functions of KP2, KP4, KP6, and KP8.
F20 Puts the keypad in the CONTRACT state, enabling the contract-display functions of KP2, KP4, KP6, and KP8.

If you have a VT100 keyboard, you can simulate the effect of LK201 keys F17 to F20 by assigning the functions of those keys to other key sequences. You can make key assignments in a command procedure, such as your debugger initialization file (see init_sec). The following code contains key assignments that allow key sequences GOLD-KP9 and BLUE-KP9 (currently undefined) to mimic the effects of cycling through keys F17 to F20). When these key assignments are in effect, Press GOLD-KP9 to put the keypad in the DEFAULT (scroll) state; press BLUE-KP9 repeatedly to cycle the keypad through the DEFAULT, MOVE, EXPAND, and CONTRACT states.

DEFINE/KEY/IF_STATE=(GOLD,MOVE_GOLD,EXPAND_GOLD,CONTRACT_GOLD)- 
 /TERMINATE KP9 "SET KEY/STATE=DEFAULT/NOLOG" 
DEFINE/KEY/IF_STATE=(BLUE)- 
 /TERMINATE KP9 "SET KEY/STATE=MOVE/NOLOG" 
DEFINE/KEY/IF_STATE=(MOVE_BLUE)- 
 /TERMINATE KP9 "SET KEY/STATE=EXPAND/NOLOG" 
DEFINE/KEY/IF_STATE=(EXPAND_BLUE)- 
 /TERMINATE KP9 "SET KEY/STATE=CONTRACT/NOLOG" 
DEFINE/KEY/IF_STATE=(CONTRACT_BLUE)- 
 /TERMINATE KP9 "SET KEY/STATE=DEFAULT/NOLOG" 

A.4 Online Keypad Key Diagrams

Online help for the keypad keys is available by pressing the Help key and also the PF2 key, either by itself or with other keys (see Table A-3). You can also use the SHOW KEY command to identify key definitions.

Table A-3 Keys that Invoke Online Help to Display Keypad Diagrams
Key or
Key Sequence
Command Sequence Invoked Description
Help HELP KEYPAD SUMMARY Shows a diagram of the keypad keys and summarizes each key's function
PF2 HELP KEYPAD DEFAULT Shows a diagram of the keypad keys and their DEFAULT functions
PF1-PF2 HELP KEYPAD GOLD Shows a diagram of the keypad keys and their GOLD functions
PF4-PF2 HELP KEYPAD BLUE Shows a diagram of the keypad keys and their BLUE functions
F18-PF2 HELP KEYPAD MOVE Shows a diagram of the keypad keys and their MOVE DEFAULT functions
F18-PF1-PF2 HELP KEYPAD MOVE_GOLD Shows a diagram of the keypad keys and their MOVE GOLD functions
F18-PF4-PF2 HELP KEYPAD MOVE_BLUE Shows a diagram of the keypad keys and their MOVE BLUE functions
F19-PF2 HELP KEYPAD EXPAND Shows a diagram of the keypad keys and their EXPAND DEFAULT functions
F19-PF1-PF2 HELP KEYPAD EXPAND_GOLD Shows a diagram of the keypad keys and their EXPAND GOLD functions
F19-PF4-PF2 HELP KEYPAD EXPAND_BLUE Shows a diagram of the keypad keys and their EXPAND BLUE functions
F20-PF2 HELP KEYPAD CONTRACT Shows a diagram of the keypad keys and their CONTRACT DEFAULT functions
F20-PF1-PF2 HELP KEYPAD CONTRACT_GOLD Shows a diagram of the keypad keys and their CONTRACT GOLD functions
F20-PF4-PF2 HELP KEYPAD CONTRACT_BLUE Shows a diagram of the keypad keys and their CONTRACT BLUE functions

A.5 Debugger Key Definitions

Table A-4 identifies all key definitions.

Table A-4 Debugger Key Definitions
Key State Command Invoked or Function
KP0 DEFAULT STEP
GOLD STEP/INTO
BLUE STEP/OVER
KP1 DEFAULT EXAMINE. Examines the logical successor of the current entity, if one is defined (the next location).
GOLD EXAMINE ^. Enables you to examine the logical predecessor of the current entity, if one is defined (the previous location).
BLUE Displays three sets of predefined process-specific source and instruction displays, SRC_ n and INST_ n. These consist of source and instruction displays for the visible process at S2 and RS2, respectively; source and instruction displays for the previous process on the process list at S1 and RS1, respectively; and source and instruction displays for the next process on the process list at S3 and RS3, respectively.
KP2 DEFAULT SCROLL/DOWN
GOLD SCROLL/BOTTOM
BLUE SCROLL/DOWN (not terminated). To terminate the command, supply the number of lines to be scrolled (: n) or a display name.
MOVE MOVE/DOWN
MOVE_GOLD MOVE/DOWN:999
MOVE_BLUE MOVE/DOWN:5
EXPAND EXPAND/DOWN
EXPAND_GOLD EXPAND/DOWN:999
EXPAND_BLUE EXPAND/DOWN:5
CONTRACT EXPAND/DOWN:-1
CONTRACT_GOLD EXPAND/DOWN:-999
CONTRACT_BLUE EXPAND/DOWN:-5
KP3 DEFAULT SELECT/SCROLL %NEXTSCROLL. Selects as the current scrolling display the next display in the display list after the current scrolling display.
GOLD SELECT/OUTPUT %NEXTOUTPUT. Selects the next output display in the display list as the current output display.
BLUE Displays three predefined process-specific source displays, SRC_ n. These are located at S1, S2, and S3, respectively, for the previous, current (visible), and next process on the process list.
KP4 DEFAULT SCROLL/LEFT
GOLD SCROLL/LEFT:255
BLUE SCROLL/LEFT (not terminated). To terminate the command, supply the number of lines to be scrolled (: n) or a display name.
MOVE MOVE/LEFT
MOVE_GOLD MOVE/LEFT:999
MOVE_BLUE MOVE/LEFT:10
EXPAND EXPAND/LEFT
EXPAND_GOLD EXPAND/LEFT:999
EXPAND_BLUE EXPAND/LEFT:10
CONTRACT EXPAND/LEFT:-1
CONTRACT_GOLD EXPAND/LEFT:-999
CONTRACT_BLUE EXPAND/LEFT:-10
KP5 DEFAULT EXAMINE/SOURCE .%SOURCE_SCOPE\%PC; EXAMINE/INST .%INST_SCOPE\%PC. In line (noscreen) mode, displays the source line and the instruction to be executed next. In screen mode, centers the current source display on the next source line to be executed, and the current instruction display on the next instruction to be executed.
GOLD SHOW CALLS
BLUE SHOW CALLS 3
KP6 DEFAULT SCROLL/RIGHT
GOLD SCROLL/RIGHT:255
BLUE SCROLL/RIGHT (not terminated). To terminate the command, supply the number of lines to be scrolled (: n) or a display name.
MOVE MOVE/RIGHT
MOVE_GOLD MOVE/RIGHT:999
MOVE_BLUE MOVE/RIGHT:10
EXPAND EXPAND/RIGHT
EXPAND_GOLD EXPAND/RIGHT:999
EXPAND_BLUE EXPAND/RIGHT:10
CONTRACT EXPAND/RIGHT:-1
CONTRACT_GOLD EXPAND/RIGHT:-999
CONTRACT_BLUE EXPAND/RIGHT:-10
KP7 DEFAULT DISPLAY SRC AT LH1, INST AT RH1, OUT AT S45, PROMPT AT S6; SELECT/SCROLL/SOURCE SRC; SELECT/INST INST; SELECT/OUT OUT. Displays the SRC, INST, OUT, and PROMPT displays with the proper attributes.
GOLD DISPLAY INST AT LH1, REG AT RH1, OUT AT S45, PROMPT AT S6; SELECT/SCROLL/INST INST; SELECT/OUT OUT. Displays the INST, REG, OUT, and PROMPT displays with the proper attributes.
BLUE Displays two sets of predefined process-specific source and instruction displays, SRC_ n and INST_ n. These consist of source and instruction displays for the visible process at Q1 and RQ1, respectively, and source and instruction displays for the next process on the process list at Q2 and RQ2, respectively.
KP8 DEFAULT SCROLL/UP
GOLD SCROLL/TOP
BLUE SCROLL/UP (not terminated). To terminate the command, supply the number of lines to be scrolled (: n) or a display name.
MOVE MOVE/UP
MOVE_GOLD MOVE/UP:999
MOVE_BLUE MOVE/UP:5
EXPAND EXPAND/UP
EXPAND_GOLD EXPAND/UP:999
EXPAND_BLUE EXPAND/UP:5
CONTRACT EXPAND/UP:-1
CONTRACT_GOLD EXPAND/UP:-999
CONTRACT_BLUE EXPAND/UP:-5
KP9 DEFAULT DISPLAY %NEXTDISP. Displays the next display in the display list through its current window (removed displays are not included).
GOLD SET PROCESS/VISIBLE %NEXT_PROCESS. Makes the next process in the process list the visible process.
BLUE Displays two predefined process-specific source displays, SRC_ n. These are located at Q1 and Q2, respectively, for the visible process and for the next process on the process list.
PF1 Invokes the GOLD function of the next key you press.
PF2 Shows a diagram of the keypad keys and their DEFAULT functions
PF3 DEFAULT SET MODE SCREEN; SET STEP NOSOURCE. Enables screen mode and suppresses the output of source lines that would normally appear in the output display (since that output is redundant when the source display is present).
GOLD SET MODE NOSCREEN; SET STEP SOURCE. Disables screen mode and restores the output of source lines.
BLUE DISPLAY/GENERATE. Regenerates the contents of all automatically updated displays.
PF4 Invokes the BLUE function of the next key you press.
COMMA DEFAULT GO
GOLD SELECT/SOURCE %NEXT_SOURCE. Selects the next source display in the display list as the current source display.
BLUE SELECT/INSTRUCTION %NEXTINST. Selects the next instruction display in the display list as the current instruction display.
MINUS DEFAULT DISPLAY %NEXTDISP AT S12345, PROMPT AT S6; SELECT/SCROLL %CURDISP. Displays the next display in the display list at essentially full screen (top of screen to top of PROMPT display). Selects that display as the current scrolling display.
GOLD Undefined.
BLUE DISPLAY SRC AT H1, OUT AT S45, PROMPT AT S6; SELECT/SCROLL/SOURCE SRC; SELECT/OUT OUT. Displays the SRC, OUT, and PROMPT displays with the proper attributes. This is the default display configuration.
Enter Enables you to enter (terminate) a command. Same effect as Return.
PERIOD All states Cancels the effect of pressing state keys that do not lock the state, such as GOLD and BLUE. Does not affect the operation of state keys that lock the state, such as MOVE, EXPAND, and CONTRACT.
Next Screen (E6) DEFAULT SCROLL/DOWN
Prev Screen (E5) DEFAULT SCROLL/UP
Remove (E3) DEFAULT DISPLAY/REMOVE %CURSCROLL. Removes the current scrolling display from the display list.
Select (E4) DEFAULT SELECT/SCROLL %NEXTSCROLL. Selects as the current scrolling display the next display in the display list after the current scrolling display.
F17 Puts the keypad in the DEFAULT state, enabling the scroll-display functions of KP2, KP4, KP6, and KP8. The keypad is in the DEFAULT state when you invoke the debugger.
F18 Puts the keypad in the MOVE state, enabling the move-display functions of KP2, KP4, KP6, and KP8.
F19 Puts the keypad in the EXPAND state, enabling the expand-display functions of KP2, KP4, KP6, and KP8.
F20 Puts the keypad in the CONTRACT state, enabling the contract-display functions of KP2, KP4, KP6, and KP8.
Ctrl/W DISPLAY/REFRESH
Ctrl/Z EXIT


Appendix B
Built-In Symbols and Logical Names

This appendix identifies all the debugger built-in symbols and logical names.

B.1 SS$_DEBUG Condition

SS$_DEBUG (defined in SYS$LIBRARY:STARLET.OLB) is a condition you can signal from your program to start the debugger. Signaling SS$_DEBUG from your program is equivalent to pressing Ctrl/Y followed by the DCL command DEBUG at that point.


Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]

[HR]

  4538P050.HTM
  OSSG Documentation
  22-NOV-1996 13:02:49.74

Copyright © Digital Equipment Corporation 1996. All Rights Reserved.

Legal