[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS Debugger Manual


Previous Contents Index


SAVE

Preserves the contents of an existing screen display in a new display.

Note

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

Format

SAVE old-display AS new-display [,...]


Parameters

old-display

Specifies the display whose contents are saved. You can specify any of the following entities:
  • A predefined display:
    SRC
    OUT
    PROMPT
    INST
    REG
    FREG (Integrity servers and Alpha only)
    IREG
  • A display previously created with the DISPLAY command
  • A display built-in symbol:
    %CURDISP
    %CURSCROLL
    %NEXTDISP
    %NEXTINST
    %NEXTOUTPUT
    %NEXTSCROLL
    %NEXTSOURCE

new-display

Specifies the name of the new display to be created. This new display then receives the contents of the old-disp display.

Description

The SAVE command enables you to save a snapshot copy of an existing display in a new display for later reference. The new display is created with the same text contents as the existing display. In general, the new display is given all the attributes or characteristics of the old display except that it is removed from the screen and is never automatically updated. You can later recall the saved display to the terminal screen with the DISPLAY command.

When you use the SAVE command, only those lines that are currently stored in the display's memory buffer (as determined by the /SIZE qualifier on the DISPLAY command) are stored in the saved display. However, in the case of a saved source or instruction display, you can also see any other source lines associated with that module or any other instructions associated with that routine (by scrolling the saved display).

You cannot save the PROMPT display.

Related commands:

DISPLAY
EXITLOOP

Example


DBG> SAVE REG AS OLDREG
      

This command saves the contents of the display named REG into the newly created display named OLDREG.


SCROLL

Scrolls a screen display to make other parts of the text visible through the display window.

Note

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

Format

SCROLL [display-name]


Parameters

display-name

Specifies a display to be scrolled. You can specify any of the following entities:
  • A predefined display:
    SRC
    OUT
    PROMPT
    INST
    REG
    FREG (Integrity servers and Alpha only)
    IREG
  • A display previously created with the DISPLAY command
  • A display built-in symbol:
    %CURDISP
    %CURSCROLL
    %NEXTDISP
    %NEXTINST
    %NEXTOUTPUT
    %NEXTSCROLL
    %NEXTSOURCE

If you do not specify a display, the current scrolling display, as established by the SELECT command, is chosen.


Qualifiers

/BOTTOM

Scrolls down to the bottom of the display's text.

/DOWN:[n]

Scrolls down over the display's text by n lines to reveal text further down in the display. If you omit n, the display is scrolled by approximately 3/4 of its window height.

/LEFT:[n]

Scrolls left over the display's text by n columns to reveal text beyond the left window border. You cannot scroll past column 1. If you omit n, the display is scrolled left by 8 columns.

/RIGHT[:n]

Scrolls right over the display's text by n columns to reveal text beyond the right window border. You cannot scroll past column 255. If you omit n, the display is scrolled right by 8 columns.

/TOP

Scrolls up to the top of the display's text.

/UP[:n]

Scrolls up over the display's text by n lines to reveal text further up in the display. If you omit n, the display is scrolled by approximately 3/4 of its window height.

Description

The SCROLL command moves a display up, down, right, or left relative to its window so that various parts of the display text can be made visible through the window.

Use the SELECT/SCROLL command to select the target display for the SCROLL command (the current scrolling display).

For a list of the key definitions associated with the SCROLL command, type Help Keypad_Definitions_CI. Also, use the SHOW KEY command to determine the current key definitions.

Related command: SELECT.


Examples

#1

DBG> SCROLL/LEFT
      

This command scrolls the current scrolling display to the left by 8 columns.

#2

DBG> SCROLL/UP:4 ALPHA
      

This command scrolls display ALPHA 4 lines up.


SEARCH

Searches the source code for a specified string and displays source lines that contain an occurrence of the string.

Format

SEARCH [range] [string]


Parameters

range

Specifies a program region to be searched. Use any of the following formats:
mod-name Searches the specified module from line 0 to the end of the module.
mod-name\line-num Searches the specified module from the specified line number to the end of the module.
mod-name\line-num:line-num Searches the specified module from the line number specified on the left of the colon to the line number specified on the right.
line-num Uses the current scope to find a module and searches that module from the specified line number to the end of the module. The current scope is established by a previous SET SCOPE command, or the PC scope if you did not enter a SET SCOPE command. If you specify a scope search list with the SET SCOPE command, the debugger searches only the module associated with the first named scope.
line-num:line-num Uses the current scope to find a module and searches that module from the line number specified on the left of the colon to the line number specified on the right. The current scope is established by a previous SET SCOPE command, or the PC scope if you did not enter a SET SCOPE command. If you specify a scope search list with the SET SCOPE command, the debugger searches only the module associated with the first named scope.
null (no entry) Searches the same module as that from which a source line was most recently displayed (as a result of a TYPE, EXAMINE/SOURCE, or SEARCH command, for example), beginning at the first line following the line most recently displayed and continuing to the end of the module.

string

Specifies the source code characters for which to search. If you do not specify a string, the string specified in the last SEARCH command, if any, is used.

You must enclose the string in quotation marks (") or apostrophes (') under the following conditions:

  • The string has any leading or ending space or tab characters
  • The string contains an embedded semicolon
  • The range parameter is null

If the string is enclosed in quotation marks, use two consecutive quotation marks ("") to indicate an enclosed quotation mark. If the string is enclosed in apostrophes, use two consecutive apostrophes ('') to indicate an enclosed apostrophe.


Qualifiers

/ALL

Specifies that the debugger search for all occurrences of the string in the specified range and display every line containing an occurrence of the string.

/IDENTIFIER

Specifies that the debugger search for an occurrence of the string in the specified range but display the string only if it is not bounded on either side by a character that can be part of an identifier in the current language.

/NEXT

(Default) Specifies that the debugger search for the next occurrence of the string in the specified range and display only the line containing this occurrence.

/STRING

(Default) Specifies that the debugger search for and display the string as specified, and not interpret the context surrounding an occurrence of the string, as it does in the case of /IDENTIFIER.

Description

The SEARCH command displays the lines of source code that contain an occurrence of a specified string.

If you specify a module name with the SEARCH command, that module must be set. To determine whether a particular module is set, use the SHOW MODULE command, then use the SET MODULE command, if necessary.

Qualifiers for the SEARCH command determine whether the debugger: (1) searches for all occurrences (/ALL) of the string or only the next occurrence (/NEXT); and (2) displays any occurrence of the string (/STRING) or only those occurrences in which the string is not bounded on either side by a character that can be part of an identifier in the current language (/IDENTIFIER).

If you plan to enter several SEARCH commands with the same qualifier, you can first use the SET SEARCH command to establish a new default qualifier (for example, SET SEARCH ALL makes the SEARCH command behave like SEARCH/ALL). Then you do not have to use that qualifier with the SEARCH command. You can override the current default qualifiers for the duration of a single SEARCH command by specifying other qualifiers.

Related commands:

(SET,SHOW) LANGUAGE
(SET,SHOW) MODULE
(SET,SHOW) SCOPE
(SET,SHOW) SEARCH

Examples

#1

DBG> SEARCH/STRING/ALL 40:50 D
module COBOLTEST 
    40: 02      D2N     COMP-2 VALUE -234560000000. 
    41: 02      D       COMP-2 VALUE  222222.33. 
    42: 02      DN      COMP-2 VALUE -222222.333333. 
    47: 02      DR0     COMP-2 VALUE  0.1. 
    48: 02      DR5     COMP-2 VALUE  0.000001. 
    49: 02      DR10    COMP-2 VALUE  0.00000000001. 
    50: 02      DR15    COMP-2 VALUE  0.0000000000000001.
DBG>
      

This command searches for all occurrences of the letter D in lines 40 to 50 of the module COBOLTEST, the module that is in the current scope.

#2

DBG> SEARCH/IDENTIFIER/ALL 40:50 D
module COBOLTEST 
    41: 02      D       COMP-2 VALUE  222222.33.
DBG>
      

This command searches for all occurrences of the letter D in lines 40 to 50 of the module COBOLTEST. The debugger displays the only line where the letter D (the search string) is not bounded on either side by a character that can be part of an identifier in the current language.

#3

DBG> SEARCH/NEXT 40:50 D
module COBOLTEST 
    40: 02      D2N     COMP-2 VALUE -234560000000.
DBG>
      

This command searches for the next occurrence of the letter D in lines 40 to 50 of the module COBOLTEST.

#4

DBG> SEARCH/NEXT
module COBOLTEST 
    41: 02      D       COMP-2 VALUE  222222.33.
DBG>
      

This command searches for the next occurrence of the letter D. The debugger assumes D to be the search string because D was the last one entered and no other search string was specified.

#5

DBG> SEARCH 43 D
module COBOLTEST 
    47: 02      DR0     COMP-2 VALUE  0.1.
DBG>
      

This command searches for the next occurrence (by default) of the letter D, starting with line 43.


SDA

Invokes the System Dump Analyzer (SDA) from within the OpenVMS debugger without terminating a debugger session.

Format

SDA [sda-command]


Parameters

sda-command

One SDA command to be executed before returning control to the OpenVMS debugger.

Description

The SDA command allows you to use the System Dump Analyzer (SDA) within the debugger for the following tasks:
  • System code debugging with the System Code Debugger (SCD) (Alpha and Integrity servers only)
  • System dump analysis with the System Dump Debugger (SDD) (Alpha and Integrity servers only)
  • Process dump analysis with the System Dump Analyzer (SDA) (Integrity servers and Alpha only)

This gives you access to all SDA commands within the debugging session. When you exit SDA, you return to the same debugging session. Note that you do not have access to debugger commands within the SDA session.

Note

The SDA command is not available when debugging user-mode programs.

Related commands

ANALYZE/CRASH_DUMP
ANALYZE/PROCESS_DUMP
CONNECT %NODE

Example


DBG> SDA
OpenVMS (TM) Alpha process dump analyzer 
 
 SDA> .. 
 . 
 . 
 SDA> EXIT 
 DBG> 
 
      

This example opens an SDA session within the OpenVMS debugger, performs some analysis, closes the SDA session and returns control to the debugger.


DBG> SDA SHOW PROCESS
 . 
 . 
 DBG> 
      

This example show the execution of a single SDA command from within the debugger, followed by a return of control to the debugger.


SELECT

Selects a screen display as the current error, input, instruction, output, program, prompt, scrolling, or source display.

Note

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

Format

SELECT [display-name]


Parameters

display-name

Specifies the display to be selected. You can specify any one of the following, with the restrictions noted in the qualifier descriptions:
  • A predefined display:
    SRC
    OUT
    PROMPT
    INST
    REG
    FREG (Integrity servers and Alpha only)
    IREG
  • A display previously created with the DISPLAY command
  • A display built-in symbol:
    %CURDISP
    %CURSCROLL
    %NEXTDISP
    %NEXTINST
    %NEXTOUTPUT
    %NEXTSCROLL
    %NEXTSOURCE

If you omit this parameter and do not specify a qualifier, you "unselect" the current scrolling display (no display then has the scrolling attribute). If you omit this parameter but specify a qualifier (/INPUT, /SOURCE, and so on), you unselect the current display with that attribute (see the qualifier descriptions).


Qualifiers

/ERROR

Selects the specified display as the current error display. This causes all debugger diagnostic messages to go to that display. The display specified must be either an output display or the PROMPT display. If you do not specify a display, this qualifier selects the PROMPT display current error display. By default, the PROMPT display has the error attribute.

/INPUT

Selects the specified display as the current input display. This causes that display to echo debugger input (which appears in the PROMPT display). The display specified must be an output display.

If you do not specify a display, the current input display is unselected and debugger input is not echoed to any display (debugger input appears only in the PROMPT display). By default, no display has the input attribute.

/INSTRUCTION

Selects the specified display as the current instruction display. This causes the output of all EXAMINE/INSTRUCTION commands to go to that display. The display specified must be an instruction display.

If you do not specify a display, the current instruction display is unselected and no display has the instruction attribute.

By default, for all languages except MACRO--32, no display has the instruction attribute. If the language is set to MACRO--32, the INST display has the instruction attribute by default.

/OUTPUT

Selects the specified display as the current output display. This causes debugger output that is not already directed to another display to go to that display. The display specified must be either an output display or the PROMPT display.

If you do not specify a display, the PROMPT display is selected as the current output display. By default, the OUT display has the output attribute.

/PROGRAM

Selects the specified display as the current program display. This causes the debugger to try to force program input and output to that display. Currently, only the PROMPT display can be specified.

If you do not specify a display, the current program display is unselected and program input and output are no longer forced to the specified display.

By default, the PROMPT display has the program attribute, except on workstations, where the program attribute is unselected.

/PROMPT

Selects the specified display as the current prompt display. This is where the debugger prompts for input. Currently, only the PROMPT display can be specified. Moreover, you cannot unselect the PROMPT display (the PROMPT display always has the prompt attribute).

/SCROLL

(Default) Selects the specified display as the current scrolling display. This is the default display for the SCROLL, MOVE, and EXPAND commands. Although any display can have the scroll attribute, you can use only the MOVE and EXPAND commands (not the SCROLL command) with the PROMPT display.

If you do not specify a display, the current scrolling display is unselected and no display has the scroll attribute.

By default, for all languages except MACRO-32, the SRC display has the scroll attribute. If the language is set to MACRO-32, the INST display has the scroll attribute by default.

/SOURCE

Selects the specified display as the current source display. This causes the output of all TYPE and EXAMINE/SOURCE commands to go to that display. The display specified must be a source display.

If you do not specify a display, the current source display is unselected and no display has the source attribute.

By default, for all languages except MACRO--32, the SRC display has the source attribute. If the language is set to MACRO--32, no display has the source attribute by default.


Description

Attributes are used to select the current scrolling display and to direct various types of debugger output to particular displays. This gives you the option of mixing or isolating different types of information, such as debugger input, output, diagnostic messages, and so on in scrollable displays.

Use the SELECT command with one or more qualifiers (/ERROR, /SOURCE, and so on) to assign one or more corresponding attributes to a display. By default, if you do not specify a qualifier, /SCROLL is assumed.

If you use the SELECT command without specifying a display name, the attribute assignment indicated by the qualifier is canceled (unselected). To reassign display attributes, you must use another SELECT command. For more information, see the individual qualifier.

For a list of the key definitions associated with the SELECT command, type Help Keypad_Definitions_CI. Also, use the SHOW KEY command to determine the current key definitions.

Related commands:

DISPLAY
EXPAND
MOVE
SCROLL
SHOW SELECT

Examples

#1

DBG> SELECT/SOURCE/SCROLL SRC2
      

This command selects display SRC2 as the current source and scrolling display.

#2

DBG> SELECT/INPUT/ERROR OUT
      

This command selects display OUT as the current input and error display. This causes debugger input, debugger output (assuming OUT is the current output display), and debugger diagnostic messages to be logged in the OUT display in the correct sequence.

#3

DBG> SELECT/SOURCE
      

This command unselects (deletes the source attribute from) the currently selected source display. The output of a TYPE or EXAMINE/SOURCE command then goes to the currently selected output display.


Previous Next Contents Index