OpenVMS Debugger Manual


Previous Contents Index


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 Useful when debugging a multiprocess program. Specifies that, when program execution is suspended in any process, the debugger interrupts execution in all other processes that were executing images and prompts for input. See Chapter 15 for more information.
NOINTERRUPT (Default) Useful when debugging a multiprocess program. Specifies that, when program execution is suspended in any process, the debugger take no action with regard to other processes.
KEYPAD (Default) Enables keypad mode. Note that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger. 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 Disables keypad mode. Note that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger. 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.
SCREEN Enables screen mode. Note that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface the debugger. 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 (Default) Disables screen mode. Note that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger.
SCROLL (Default) Enables scroll mode. Note that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger. 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 that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger. Disables scroll mode. Note that this parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger. 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.
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.
WAIT (Default) Enables wait mode. In wait mode the debugger waits until all processes under its control have stopped before prompting for a new command. See Chapter 15 for more information.
NOWAIT Disable wait mode. In nowait mode, the debugger immediately prompts for new commands even if some or all processes are still running.

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:

EVALUATE
EXAMINE
DEFINE/KEY
DEPOSIT
DISPLAY
(SET,SHOW,CANCEL) IMAGE
(SET,SHOW,CANCEL) MODULE
SET PROMPT
(SET,SHOW,CANCEL) RADIX
(SET,SHOW) TYPE
(SHOW,CANCEL) MODE
SYMBOLIZE

Example


DBG> SET MODE SCREEN
      

This command puts the debugger in screen mode.


SET MODULE

Loads the symbol records of a module in the current image into the run-time symbol table (RST) of that image.

Notes

The current image is either the main image (by default) or the image established as the current image by a previous SET IMAGE command.

By default, the debugger automatically loads symbols in a module as needed. As such, this behavior makes the use of an explicit SET MODULE command optional. For more information, see SET MODE DYNAMIC.


Format

SET MODULE [module-name[,...]]


Parameters

module-name

Specifies a module of the current image whose symbol records are loaded into the RST. Do not use the asterisk (*) wildcard character. Instead, use the /ALL qualifier. Do not specify a module name with /ALL or /CALLS.

Qualifiers

/ALL

Specifies that the symbol records of all modules in the current image be loaded into the RST.

/CALLS

Sets all the modules that currently have routines on the call stack. If a module is already set, /CALLS has no effect on that module.

/RELATED (default)

/NORELATED

(Applies to Ada programs.) Controls whether the debugger loads into the RST the symbol records of a module that is related to a specified module through a with-clause or subunit relationship. Once loaded, you can reference names declared in related modules within debugger commands exactly as you reference them within the Ada source code.

Description

The SET MODULE command loads the symbol records of a module in the current image into the run-time symbol table (RST) of that image. Symbol records must be present in the RST if the debugger is to recognize and properly interpret the symbols declared in your program. The process by which the symbol records of a module are loaded into the RST is called setting a module. This command also supports user-provided mixed-case and lowercase module names on Alpha and Integrity servers.

At debugger startup, the debugger sets the module containing the transfer address (the main program). By default, dynamic mode is enabled (SET MODE DYNAMIC). Therefore, the debugger sets modules (and images) automatically as the program executes so that you can reference symbols as you need them. Specifically, whenever execution is suspended, the debugger sets the module and image containing the routine in which execution is suspended. In the case of Ada programs, as a module is set dynamically, its related modules are also set automatically, by default, to make the appropriate symbols accessible (visible).

Dynamic mode makes accessible most of the symbols you might need to reference. If you need to reference a symbol in a module that is not already set, proceed as follows:

If dynamic mode is disabled (SET MODE NODYNAMIC), only the module containing the transfer address is set automatically. You must set any other modules explicitly.

If you use the SET IMAGE command to establish a new current image, all modules previously set remain set. However, only the symbols in the set modules of the current image are accessible. Symbols in the set modules of other images are temporarily inaccessible.

When dynamic mode is enabled, memory is allocated automatically to accommodate the increasing size of the RST. If dynamic mode is disabled, the debugger automatically allocates more memory as needed when you set a module or an image.

If a parameter in a SET SCOPE command designates a program location in a module that is not already set, the SET SCOPE command sets that module.

For information specific to Ada programs, type Help Language_Support Ada.

Related commands:

(SET,SHOW,CANCEL) IMAGE
SET MODE [NO]DYNAMIC
(SHOW) MODULE

Examples

#1

DBG> SET MODULE SUB1
      

This command sets module SUB1 (loads the symbol records of module SUB1 into the RST).

#2

DBG> SET IMAGE SHARE3
DBG> SET MODULE MATH
DBG> SET BREAK %LINE 31
      

In this example, the SET IMAGE command makes shareable image SHARE3 the current image. The SET MODULE command sets module MATH in image SHARE3. The SET BREAK command sets a breakpoint on line 31 of module MATH.

#3

DBG> SHOW MODULE/SHARE
module name           symbols   language   size 
 
FOO                   yes       MACRO       432 
MAIN                  no        FORTRAN     280
    ...
SHARE$DEBUG           no        Image         0 
SHARE$LIBRTL          no        Image         0 
SHARE$MTHRTL          no        Image         0 
SHARE$SHARE1          no        Image         0 
SHARE$SHARE2          no        Image         0 
 
total modules: 17.              bytes allocated: 162280.
DBG> SET MODULE SHARE$SHARE2
DBG> SHOW SYMBOL * IN SHARE$SHARE2
      

In this example, the SHOW MODULE/SHARE command identifies all modules in the current image and all shareable images (the names of the shareable images are prefixed with SHARE$). The SET MODULE SHARE$SHARE2 command sets the shareable image module SHARE$SHARE2. The SHOW SYMBOL command identifies any universal symbols defined in the shareable image SHARE2. For more information, see the SHOW MODULE/SHARE command.

#4

DBG> SET BREAK X/Y:
      

In this example, the debugger automatically loads the module information when you specify the module name in the command. Debugger ensures that the module information for module X is loaded, and then locates the information for the routine named Y.


SET OUTPUT

Enables or disables a debugger output option.

Format

SET OUTPUT output-option[,...]


Parameters

output-option

Specifies an output option to be enabled or disabled. Valid keywords are as follows:
LOG Specifies that debugger input and output be recorded in a log file. If you specify the log file by the SET LOG command, the debugger writes to that file; otherwise, by default the debugger writes to SYS$DISK[]:DEBUG.LOG.
NOLOG (Default) Specifies that debugger input and output not be recorded in a log file.
SCREEN_LOG Specifies that, while in screen mode, the screen contents be recorded in a log file as the screen is updated. To log the screen contents, you must also specify SET OUTPUT LOG. See the description of the LOG option regarding specifying the log file.
NOSCREEN_LOG (Default) Specifies that the screen contents, while in screen mode, not be recorded in a log file.
TERMINAL

Note

This parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger.

(Default) Specifies that debugger output be displayed at the terminal.

NOTERMINAL

Note

This parameter is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger.

Specifies that debugger output, except diagnostic messages, not be displayed at the terminal.

VERIFY Specifies that the debugger echo, on the current output device, each input command string that it is executing from a command procedure or DO clause. The current output device is by default SYS$OUTPUT (your terminal) but can be redefined with the logical name DBG$OUTPUT.
NOVERIFY (Default) Specifies that the debugger not display each input command string that it is executing from a command procedure or DO clause.

Description

Debugger output options control the way in which debugger responses to commands are displayed and recorded. For details about the SET OUTPUT command, see the parameter descriptions.

Related commands:

@ (Execute Procedure)
(SET,SHOW) ATSIGN
(SET,SHOW) LOG
SET MODE SCREEN
SHOW OUTPUT

Example


DBG> SET OUTPUT VERIFY,LOG,NOTERMINAL
      

This command specifies that the debugger take the following actions:


SET PROCESS

Establishes the visible process or enables/disables dynamic process setting.

Used only when debugging multiprocess programs (kept debugger only).


Format

SET PROCESS [process-spec[,...]]


Parameters

process-spec

Specifies a process currently under debugger control. Use any of the following forms:
[%PROCESS_NAME] process-name The process name, if that name does not contain spaces or lowercase characters. The process name can include the asterisk (*) wildcard character.
[%PROCESS_NAME] " process-name " The process name, if that name contains spaces or lowercase characters. You can also use apostrophes (') instead of quotation marks (").
%PROCESS_PID process_id The process identifier (PID, a hexadecimal number).
[%PROCESS_NUMBER] process-number
(or %PROC process-number)
The number assigned to a process when it comes under debugger control. A new number is assigned sequentially, starting with 1, to each process. If a process is terminated with the EXIT or QUIT command, the number can be assigned again during the debugging session. Process numbers appear in a SHOW PROCESS display. Processes are ordered in a circular list so they can be indexed with the built-in symbols %PREVIOUS_PROCESS and %NEXT_PROCESS.
process-set-name A symbol defined with the DEFINE/PROCESS_SET command to represent a group of processes.
%NEXT_PROCESS The next process after the visible process in the debugger's circular process list.
%PREVIOUS_PROCESS The process previous to the visible process in the debugger's circular process list.
%VISIBLE_PROCESS The process whose stack, register set, and images are the current context for looking up symbols, register values, routine calls, breakpoints, and so on.

You can also use the asterisk (*) wildcard character to specify process set all.

Do not specify a process with the /[NO]DYNAMIC qualifier.


Qualifiers

/DYNAMIC (default)

/NODYNAMIC

Controls whether dynamic process setting is enabled or disabled. When dynamic process setting is enabled (/DYNAMIC), whenever the debugger suspends execution and displays its prompt, the process in which execution is suspended automatically becomes the visible process. When dynamic process setting is disabled (/NODYNAMIC), the visible process remains unchanged until you specify another process with the SET PROCESS/VISIBLE command.

/VISIBLE

Makes the specified process the visible process. This switches your debugging context to the specified process, so that symbol lookups and the setting of breakpoints, and so on, are done in the context of that process. When using /VISIBLE, you must specify one process.

Description

The SET PROCESS command establishes the visible process, defines the current process set, or defines the visible process.

By default, commands are executed in the context of the visible process (the process that is your current debugging context). Symbol lookups, the setting of breakpoints, and so on, are done in the context of the visible process.

Dynamic process setting is enabled by default and is controlled with /[NO]DYNAMIC. When dynamic process setting is enabled, whenever the debugger suspends program execution and displays its prompt, the process in which execution is suspended becomes the visible process automatically.

Related commands:

CALL
EXIT
GO
QUIT
SHOW PROCESS
STEP

Example


all> SET PROCESS TEST_Y
all> SHOW PROCESS
 Number   Name         State     Current PC 
*    2 TEST_Y          break     PROG\%LINE 71
all>
      

The SET PROCESS TEST_Y command makes process TEST_Y the visible process. The SHOW PROCESS command displays information about the visible process by default.


Previous Next Contents Index