OpenVMS Debugger Manual


Previous Contents Index


SET DEFINE

Establishes a default qualifier (/ADDRESS, /COMMAND, /PROCESS_GROUP, or /VALUE) for the DEFINE command.

Format

SET DEFINE define-default


Parameters

define-default

Specifies the default to be established for the DEFINE command. Valid keywords (which correspond to DEFINE command qualifiers) are as follows:
ADDRESS Subsequent DEFINE commands are treated as DEFINE/ADDRESS. This is the default.
COMMAND Subsequent DEFINE commands are treated as DEFINE/COMMAND.
PROCESS_SET Subsequent DEFINE commands are treated as DEFINE/PROCESS_SET.
VALUE Subsequent DEFINE commands are treated as DEFINE/VALUE.

Description

The SET DEFINE command establishes a default qualifier for subsequent DEFINE commands. The parameters that you specify in the SET DEFINE command have the same names as the qualifiers for the DEFINE command. The qualifiers determine whether the DEFINE command binds a symbol to an address, a command string, a list of processes, or a value.

You can override the current DEFINE default for the duration of a single DEFINE command by specifying another qualifier. Use the SHOW DEFINE command to identify the current DEFINE defaults.

Related commands:

DEFINE
DEFINE/PROCESS_SET
DELETE
SHOW DEFINE
SHOW SYMBOL/DEFINED

Example


DBG> SET DEFINE VALUE
      

The SET DEFINE VALUE command specifies that subsequent DEFINE commands are treated as DEFINE/VALUE.


SET EDITOR

Establishes the editor that is started by the EDIT command.

Format

SET EDITOR [command-line]


Parameters

command-line

Specifies a command line to start a particular editor on your system when you use the EDIT command.

You need not specify a command line if you use /CALLABLE_EDT, /CALLABLE_LSEDIT, or /CALLABLE_TPU. If you do not use one of these qualifiers, the editor specified in the SET EDITOR command line is spawned to a subprocess when you enter the EDIT command.

You can specify a command line with /CALLABLE_LSEDIT or /CALLABLE_TPU but not with /CALLABLE_EDT.


Qualifiers

/CALLABLE_EDT

Specifies that the callable version of the EDT editor is started when you use the EDIT command. Do not specify a command line with this qualifier (a command line of "EDT" is used).

/CALLABLE_TPU

Specifies that the callable version of the DEC Text Processing Utility (DECTPU) is started when you use the EDIT command. If you also specify a command line, it is passed to callable DECTPU. If you do not specify a command line, the default command line is TPU.

/START_POSITION

/NOSTART_POSITION (default)

Controls whether the /START_POSITION qualifier is appended to the specified or default command line when you enter the EDIT command. Currently, only DECTPU and the DEC Language-Sensitive Editor (specified as TPU or /CALLABLE_TPU, and LSEDIT or /CALLABLE_LSEDIT, respectively) support this qualifier.

The /START_POSITION qualifier affects the initial position of the editor's cursor. By default (/NOSTART_POSITION), the editor's cursor is placed at the beginning of source line 1, regardless of which line is centered in the debugger's source display or whether you specify a line number in the EDIT command. If you specify /START_POSITION, the cursor is placed either on the line whose number you specify in the EDIT command, or (if you do not specify a line number) on the line that is centered in the current source display.


Description

The SET EDITOR command enables you to specify any editor that is installed on your system. In general, the command line specified as parameter to the SET EDITOR command is spawned and executed in a subprocess.

On Alpha and Integrity servers, if you use EDT, LSEDIT, or DECTPU, you can start these editors in a more efficient way. You can specify /CALLABLE_EDT or /CALLABLE_TPU which causes the callable versions of EDT and DECTPU respectively, to be invoked by the EDIT command. In the case of DECTPU, you can also specify a command line that is executed by the callable editor.

Related commands:

EDIT
(SET,SHOW,CANCEL) SOURCE
SHOW DEFINE

Examples

#1

DBG> SET EDITOR '@MAIL$EDIT ""'
      

This command causes the EDIT command to spawn the command line '@MAIL$EDIT ""', which starts the same editor as you use in MAIL.

#2

DBG> SET EDITOR/CALLABLE_TPU
      

This command causes the EDIT command to start callable DECTPU with the default command line of TPU.

#3

DBG> SET EDITOR/CALLABLE_TPU TPU/SECTION=MYSECINI.TPU$SECTION
      

This command causes the EDIT command to start callable DECTPU with the command line TPU/SECTION=MYSECINI.TPU$SECTION.

#4

DBG> SET EDITOR/CALLABLE_EDT/START_POSITION
      

This command causes the EDIT command to start callable EDT with the default command line of EDT. Also the /START_POSITION qualifier is appended to the command line, so that the editing session starts on the source line that is centered in the debugger's current source display.


SET EVENT_FACILITY

Establishes the current event facility.

Event facilities are available for programs that call Ada or SCAN routines or that use POSIX Threads services.


Format

SET EVENT_FACILITY facility-name


Parameters

facility-name

Specifies an event facility. Valid facility-name keywords are as follows:
ADA If the event facility is set to ADA, the (SET,CANCEL) BREAK and (SET,CANCEL) TRACE commands recognize Ada-specific events as well as generic, low-level task events. (Ada events consist of task and exception events.)

You can set the event facility to ADA only if the main program is written in Ada or if the program calls an Ada routine.

THREADS If the event facility is set to THREADS, the (SET,CANCEL) BREAK and (SET,CANCEL) TRACE commands recognize POSIX Threads-specific as well as generic, low-level task events. All POSIX Threads events are task (thread) events.

You can set the event facility to THREADS only if the shareable image CMA$RTL is currently part of the program's process (if that image is listed in a SHOW IMAGE display).


Description

The current event facility (ADA, THREADS, or SCAN) defines the eventpoints that you can set with the SET BREAK/EVENT and SET TRACE/EVENT commands.

When started with a program that is linked with an event facility, the debugger automatically sets the facility in a manner appropriate for the type of program. For example, if the main program is written in Ada or SCAN, the event facility is set to ADA or SCAN, respectively.

The SET EVENT_FACILITY command enables you to change the event facility and thereby change your debugging context. This is useful if you have a multilanguage program and want to debug a routine that is associated with an event facility but that facility is not currently set.

Use the SHOW EVENT_FACILITY command to identify the event names associated with the current event facility. These are the keywords that you can specify with the (SET,CANCEL) BREAK/EVENT and (SET,CANCEL) TRACE/EVENT commands.

Related commands:

(SET,CANCEL) BREAK/EVENT
(SET,CANCEL) TRACE/EVENT
SHOW BREAK
SHOW EVENT_FACILITY
SHOW IMAGE
SHOW TASK
SHOW TRACE

Example


DBG> SET EVENT_FACILITY THREADS
      

This command establishes THREADS (POSIX Threads) as the current event facility.


SET IMAGE

Loads symbol information for one or more shareable images and establishes the current image.

Format

SET IMAGE [image-name[,...]]


Parameters

image-name

Specifies a shareable image to be set. Do not use the asterisk (*) wildcard character. Instead, use the /ALL qualifier. Do not specify an image name with /ALL.

Qualifiers

/ALL

Specifies that all shareable images are set.

Description

The SET IMAGE command builds data structures for one or more specified images but does not set any modules within the images specified.

The current image is the current debugging context: you have access to symbols in the current image. If you specify only one image with the SET IMAGE command, that image becomes the current image. If you specify a list of images, the last one in the list becomes the current image. If you specify /ALL, the current image is unchanged.

Before an image can be set with the SET IMAGE command, it must have been linked with the /DEBUG or /TRACEBACK qualifier on the DCL command LINK. If an image was linked /NOTRACEBACK, no symbol information is available for that image and you cannot specify it with the SET IMAGE command.

Definitions created with the DEFINE/ADDRESS and DEFINE/VALUE commands are available only when the image in whose context they were created is the current image. When you use the SET IMAGE command to establish a new current image, these definitions are temporarily unavailable. However, definitions created with the DEFINE/COMMAND and DEFINE/KEY commands are available for all images.

Related commands:

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

Example


DBG> SET IMAGE SHARE1
DBG> SET MODULE SUBR
DBG> SET BREAK SUBR
      

This sequence of commands shows how to set a breakpoint on routine SUBR in module SUBR of shareable image SHARE1. The SET IMAGE command sets the debugging context to SHARE1. The SET MODULE command loads the symbol records of module SUBR into the run-time symbol table (RST). The SET BREAK command sets a breakpoint on routine SUBR.


SET KEY

Establishes the current key state.

Note

This command is not available in the HP DECwindows Motif for OpenVMS user 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:

DELETE/KEY
DEFINE/KEY
SHOW KEY

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 Integrity servers, valid keywords are:
AMACRO BASIC BLISS C
C++ COBOL Fortran PASCAL
UNKNOWN      

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

MACRO-32 must be compiled with the AMACRO compiler.


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. The exceptions are BLISS and MACRO, 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 is advisable to change the default type to quadword for debugging applications that use the 64-bit address space (on OpenVMS Integrity servers, the default type is quadword). 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. see the Language_Support help topic.

Related commands:

EVALUATE
EXAMINE
DEPOSIT
SET MODE
SET RADIX
SET TYPE
SHOW LANGUAGE

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 LANGUAGE/DYNAMIC

Toggles the state of automatic language setting.

Format

SET LANGUAGE/DYNAMIC


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. By default, when the scope of the program being executed changes to a module written in a different language, the debugger changes the current language to that of the module.

You can prevent the debugger from automatically changing the current language with the SET LANGUAGE/NODYNAMIC command.

Related commands:

SET LANGUAGE
SHOW LANGUAGE

Examples

#1

DBG> SET LANGUAGE/NODYNAMIC
      

This command prevents the debugger from changing the current language until you enter a SET LANGUAGE or SET LANGUAGE/DYNAMIC command.


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:

SET OUTPUT LOG
SET OUTPUT SCREEN_LOG
SHOW LOG

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 HP DECwindows Motif for OpenVMS user 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:

SET STEP [NO]SOURCE
SHOW MARGINS

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.


Previous Next Contents Index