[OpenVMS documentation]
[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
Updated: 11 December 1998

OpenVMS Debugger Manual


Previous Contents Index


SET KEY

Establishes the current key state.

Note

This command is not available in the DECwindows Motif interface to the debugger.

Format

SET KEY


Qualifiers

/LOG (default)

/NOLOG

Controls whether a message is displayed indicating that the key state has been set. The /LOG qualifier displays the message. The /NOLOG qualifier suppresses the message.

/STATE[=state-name]

/NOSTATE (default)

Specifies a key state to be established as the current state. You can specify a predefined key state, such as GOLD, or a user-defined state. A state name can be any appropriate alphanumeric string. The /NOSTATE qualifier leaves the current state unchanged.

Description

Keypad mode must be enabled (SET MODE KEYPAD) before you can use this command. Keypad mode is enabled by default.

By default, the current key state is the DEFAULT state. When you define function keys, you can use the DEFINE/KEY /IF_STATE command to assign a specific state name to the key definition. If that state is not set when you press the key, the definition is not processed. The SET KEY/STATE command enables you to change the current state to the appropriate state.

You can also change the current state by pressing a key that causes a state change (a key that was defined with DEFINE/KEY/LOCK_STATE/SET_STATE).

Related commands:


Example


DBG> SET KEY/STATE=PROG3
      

This command changes the key state to the PROG3 state. You can now use the key definitions that are associated with this state.


SET LANGUAGE

Establishes the current language.

Format

SET LANGUAGE language-name


Parameters

language-name

Specifies a language.

On VAX processors, valid keywords are:
ADA BASIC BLISS C
C_PLUS_PLUS COBOL DIBOL FORTRAN
MACRO PASCAL PLI RPG
SCAN UNKNOWN    

On Alpha processors, valid keywords are:
ADA AMACRO BASIC BLISS
C C_PLUS_PLUS COBOL FORTRAN
MACRO MACRO64 PASCAL PLI
UNKNOWN      


Description

When you start the debugger, the current language is set to that in which the module containing the main program is written. This is usually the module containing the image transfer address. To debug a module written in a different source language from that of the main program, you can change the language with the SET LANGUAGE command.

The current language setting determines how the debugger parses and interprets the names, operators, and expressions you specify in debugger commands, including things like the typing of variables, array and record syntax, the default radix for the entry and display of integer data, case sensitivity, and so on. The language setting also determines how the debugger formats and displays data associated with your program.

The default radix for both data entry and display is decimal for most languages. On VAX processors, the exceptions are BLISS and MACRO--32, which have a default radix of hexadecimal. On Alpha processors, the exceptions are BLISS, MACRO--32, and MACRO--64, which have a default radix of hexadecimal.

The default type for program locations that do not have a compiler-generated type is longword integer. This is appropriate for debugging 32-bit applications. It might be advisable to change the default type to quadword for debugging applications that utilize the 64-bit address space. Use the SET TYPE QUADWORD command.

Use the SET LANGUAGE UNKNOWN command when debugging a program written in an unsupported language. To maximize the usability of the debugger with unsupported languages, SET LANGUAGE UNKNOWN causes the debugger to accept a large set of data formats and operators, including some that might be specific to only a few supported languages.

Note that SET LANGUAGE UNKNOWN can be an easy, quick workaround for language-related problems because it uses the "loosest" set of rules.

For information about debugger support for language-specific operators and constructs, type HELP Language.

Related commands:


Examples

#1

DBG> SET LANGUAGE COBOL
      

This command establishes COBOL as the current language.

#2

DBG> SET LANGUAGE PASCAL
      

This command establishes Pascal as the current language.


SET LOG

Specifies a log file to which the debugger writes after a SET OUTPUT LOG command has been entered.

Format

SET LOG file-spec


Parameters

file-spec

Denotes the file specification of the log file. If you do not supply a full file specification, the debugger assumes SYS$DISK:[]DEBUG.LOG as the default file specification for any missing field.

If you specify a version number and that version of the file already exists, the debugger writes to the file specified, appending the log of the debugging session onto the end of that file.


Description

The SET LOG command determines only the name of a log file; it does not cause the debugger to create or write to the specified file. The SET OUTPUT LOG command accomplishes that.

If you entered a SET OUTPUT LOG command but no SET LOG command, the debugger writes to the file SYS$DISK:[]DEBUG.LOG by default.

If the debugger is writing to a log file and you specify another log file with the SET LOG command, the debugger closes the former file and begins writing to the file specified in the SET LOG command.

Related commands:


Examples

#1

DBG> SET LOG CALC
DBG> SET OUTPUT LOG
      

In this example, the SET LOG command specifies the debugger log file to be SYS$DISK:[]CALC.LOG. The SET OUTPUT LOG command causes user input and debugger output to be logged to that file.

#2

DBG> SET LOG [CODEPROJ]FEB29.TMP
DBG> SET OUTPUT LOG
      

In this example, the SET LOG command specifies the debugger log file to be [CODEPROJ]FEB29.TMP. The SET OUTPUT LOG command causes user input and debugger output to be logged to that file.


SET MARGINS

Specifies the leftmost and rightmost source-line character position at which to begin and end display of a source line.

Note

This command is not available in the DECwindows Motif interface to the debugger.

Format

SET MARGINS rm
lm:rm
lm:
:rm


Parameters

lm

The source-line character position at which to begin display of the line of source code (the left margin).

rm

The source-line character position at which to end display of the line of source code (the right margin).

Description

The SET MARGINS command affects only the display of source lines. It does not affect the display of other debugger output, as from an EXAMINE command.

The SET MARGINS command is useful for controlling the display of source code when, for example, the code is deeply indented or long lines wrap at the right margin. In such cases, you can set the left margin to eliminate indented space in the source display, and you can decrease the right margin setting (from its default value of 255) to truncate lines and prevent them from wrapping.

The SET MARGINS command is useful mostly in line (noscreen) mode. In line mode, the SET MARGINS command affects the display of source lines resulting from a TYPE, EXAMINE/SOURCE, SEARCH, or STEP command, or when a breakpoint, tracepoint, or watchpoint is triggered.

In screen mode, the SET MARGINS command has no effect on the display of source lines in a source display, such as the predefined display SRC. Therefore it does not affect the output of a TYPE or EXAMINE/SOURCE command, since that output is directed at a source display. The SET MARGINS command affects only the display of any source code that might appear in an output or DO display (for example, after a STEP command has been executed). However, such source-code display is normally suppressed if you enable screen mode by pressing PF1-PF3, because that sequence issues the SET STEP NOSOURCE command as well as SET MODE SCREEN to eliminate redundant source display.

By default, the debugger displays a source line starting at character position 1 of the source line. This is actually character position 9 on your terminal screen. The first eight character positions on the screen are reserved for the line number and cannot be manipulated by the SET MARGINS command.

If you specify a single number, the debugger sets the left margin to 1 and the right margin to the number specified.

If you specify two numbers, separated with a colon, the debugger sets the left margin to the number on the left of the colon and the right margin to the number on the right.

If you specify a single number followed by a colon, the debugger sets the left margin to that number and leaves the right margin unchanged.

If you specify a colon followed by a single number, the debugger sets the right margin to that number and leaves the left margin unchanged.

Related commands:


Examples

#1

DBG> SHOW MARGINS
left margin: 1 , right margin: 255
DBG> TYPE 14
module FORARRAY
   14:        DIMENSION IARRAY(4:5,5), VECTOR(10), I3D(3,3,4)
DBG>
      

This example displays the default margin settings for a line of source code (1 and 255).

#2

DBG> SET MARGINS 39
DBG> SHOW MARGINS
left margin: 1 , right margin: 39
DBG> TYPE 14
module FORARRAY 
   14:        DIMENSION IARRAY(4:5,5), VECTOR
DBG>
      

This example shows how the display of a line of source code changes when you change the right margin setting from 255 to 39.

#3

DBG> SET MARGINS 10:45
DBG> SHOW MARGINS
left margin: 10 , right margin: 45
DBG> TYPE 14
module FORARRAY 
   14: IMENSION IARRAY(4:5,5), VECTOR(10),
DBG>
      

This example shows the display of the same line of source code after both margins are changed.

#4

DBG> SET MARGINS :100
DBG> SHOW MARGINS
left margin: 10 , right margin: 100
DBG>
      

This example shows how to change the right margin setting while retaining the previous left margin setting.

#5

DBG> SET MARGINS 5:
DBG> SHOW MARGINS
left margin: 5 , right margin: 100
DBG>
      

This example shows how to change the left margin setting while retaining the previous right margin setting.


SET MODE

Enables or disables a debugger mode.

Format

SET MODE mode[,...]


Parameters

mode

Specifies a debugger mode to be enabled or disabled. Valid keywords are as follows:
DYNAMIC (Default) Enables dynamic mode. When dynamic mode is enabled, the debugger sets modules and images automatically during program execution so that you typically do not have to enter the SET MODULE or SET IMAGE command. Specifically, whenever the debugger interrupts execution (whenever the debugger prompt is displayed), the debugger automatically sets the module and image that contain the routine in which execution is currently suspended. If the module or image is already set, dynamic mode has no effect on that module or image. The debugger issues an informational message when it sets a module or image automatically.
NODYNAMIC Disables dynamic mode. Because additional memory is allocated when a module or image is set, you might want to disable dynamic mode if performance becomes a problem (you can also free up memory by canceling modules and images with the CANCEL MODULE and CANCEL IMAGE commands). When dynamic mode is disabled, you must set modules and images explicitly with the SET MODULE and SET IMAGE commands.
G_FLOAT Specifies that the debugger interpret double-precision floating-point constants entered in expressions as G_FLOAT (does not affect the interpretation of variables declared in your program).
NOG_FLOAT (Default) Specifies that the debugger interpret double-precision floating-point constants entered in expressions as D_FLOAT (does not affect the interpretation of variables declared in your program).
INTERRUPT (Default) Applies to a multiprocess debugging configuration (when DBG$PROCESS has the value MULTIPROCESS.) Specifies that, when program execution is suspended in any process, the debugger interrupts execution in any other processes that were executing images and prompts for input.
NOINTERRUPT (Applies to a multiprocess debugging configuration---that is, when DBG$PROCESS has the value MULTIPROCESS.) Specifies that, when program execution is suspended in any process, the debugger take the following action:
  • If execution was suspended because of an unhandled exception, the debugger interrupts execution in any other processes that were executing images and prompts for input.
  • If execution was suspended because of a breakpoint or watchpoint or the completion of a STEP command, the debugger lets execution proceed in any other processes that were executing images and does not display the prompt unless execution is eventually suspended in all these processes. As long as execution continues in any process, the debugger does not prompt for input. In such cases, use Ctrl/C to interrupt all processes and display the prompt.
KEYPAD

Note

This parameter is not available in the DECwindows Motif interface to the debugger.

(Default) Enables keypad mode. When keypad mode is enabled, you can use the keys on the numeric keypad to perform certain predefined functions. Several debugger commands, especially useful in screen mode, are bound to the keypad keys. (Type Help Keypad_Definitions_CI; also, use the SHOW KEY command to determine the current key definitions.) You can also redefine the key functions with the DEFINE/KEY command.

NOKEYPAD

Note

This parameter is not available in the DECwindows Motif interface to the debugger.

Disables keypad mode. When keypad mode is disabled, the keys on the numeric keypad do not have predefined functions, nor can you assign debugger functions to those keys with DEFINE/KEY commands.

LINE (Default) Specifies that the debugger display program locations in terms of line numbers, if possible.
NOLINE Specifies that the debugger display program locations as routine-name + byte-offset rather than in terms of line numbers.
OPERANDS[= keyword] (VAX only) Specifies that the EXAMINE command, when used to examine an instruction, display the address and contents of the instruction's operands in addition to the instruction and its operands. The level of information displayed about any nonregister operands depends on whether you use the keyword BRIEF or FULL. The default is OPERANDS=BRIEF.
NOOPERANDS (VAX only; Default.) Specifies that the EXAMINE command, when used to examine an instruction, display only the instruction and its operands.
SCREEN

Note

This parameter is not available in the DECwindows Motif interface to the debugger.

Enables screen mode. When screen mode is enabled, you can divide the terminal screen into rectangular regions, so different data can be displayed in different regions. Screen mode enables you to view more information more conveniently than the default, line-oriented, noscreen mode. You can use the predefined displays, or you can define your own.

NOSCREEN

Note

This parameter is not available in the DECwindows Motif interface to the debugger.

(Default) Disables screen mode.

SCROLL

Note

This parameter is not available in the DECwindows Motif interface to the debugger.

(Default) Enables scroll mode. When scroll mode is enabled, a screen-mode output or DO display is updated by scrolling the output line by line, as it is generated.

NOSCROLL

Note

This parameter is not available in the DECwindows Motif interface to the debugger.

Disables scroll mode. When scroll mode is disabled, a screen-mode output or DO display is updated only once per command, instead of line by line as it is generated. Disabling scroll mode reduces the amount of screen updating that takes place and can be useful with slow terminals.

SEPARATE (Applies only to workstations running VWS.) Specifies that a separate window be created for debugger input and output. This feature is useful when debugging screen-oriented programs, because it moves all debugger displays out of the window that contains the program's input and output. The separate window is created with a height of 24 lines and a width of 80 columns, emulating a VT-series terminal screen.
NOSEPARATE (Default) Applies only to workstations running VWS. Specifies that no separate window be created for debugger input and output.
SYMBOLIC (Default) Enables symbolic mode. When symbolic mode is enabled, the debugger displays the locations denoted by address expressions symbolically (if possible) and displays instruction operands symbolically (if possible). EXAMINE/NOSYMBOLIC can be used to override SET MODE SYMBOLIC for the duration of an EXAMINE command.
NOSYMBOLIC Disables symbolic mode. When symbolic mode is disabled, the debugger does not attempt to symbolize numeric addresses (it does not cause the debugger to convert numbers to names). This is useful if you are interested in identifying numeric addresses rather than their symbolic names (if symbolic names exist for those addresses). When symbolic mode is disabled, command processing might speed up somewhat, because the debugger does not need to convert numbers to names. EXAMINE/SYMBOLIC can be used to override SET MODE NOSYMBOLIC for the duration of an EXAMINE command.

Description

For details about the SET MODE command, see the parameter descriptions. The default values of these modes are the same for all languages.

Related commands:


Example


DBG> SET MODE SCREEN
      

This command puts the debugger in screen mode.


Previous Next Contents Index

[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
[OpenVMS documentation]

Copyright © Compaq Computer Corporation 1998. All rights reserved.

Legal
4538PRO_053.HTML