OpenVMS Debugger Manual


Previous Contents Index

The DEFINE/KEY command enables you to assign a string to a function key, overriding any predefined function that was bound to that key. When you then press the key, the debugger enters the currently associated string into your command line. The DEFINE/KEY command is like the DCL command DEFINE/KEY.

For a list of the predefined key functions, see the Keypad_Definitions_CI online help topic.

On VT52- and VT100-series terminals, the function keys you can use include all of the numeric keypad keys. Newer terminals and workstations have the LK201 keyboard. On LK201 keyboards, the function keys you can use include all of the numeric keypad keys, the nonarrow keys of the editing keypad (Find, Insert Here, and so on), and keys F6 to F20 at the top of the keyboard.

A key definition remains in effect until you redefine the key, enter the DELETE/KEY command for that key, or exit the debugger. You can include key definitions in a command procedure, such as your debugger initialization file.

The /IF_STATE qualifier enables you to increase the number of key definitions available on your terminal. The same key can be assigned any number of definitions as long as each definition is associated with a different state.

By default, the current key state is the DEFAULT state. The current state can be changed with the SET KEY/STATE command, or 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
(SET,SHOW) KEY

Examples

#1

DBG> SET KEY/STATE=GOLD
%DEBUG-I-SETKEY, keypad state has been set to GOLD
DBG> DEFINE/KEY/TERMINATE KP9 "SET RADIX/OVERRIDE HEX"
%DEBUG-I-DEFKEY, GOLD key KP9 has been defined
 
      

In this example, the SET KEY command establishes GOLD as the current key state. The DEFINE/KEY command assigns the SET RADIX/OVERRIDE HEX command to keypad key 9 (KP9) for the current state (GOLD). The command is processed when you press the key.

#2

DBG> DEFINE/KEY/IF_STATE=BLUE KP9 "SET BREAK %LINE "
%DEBUG-I-DEFKEY, BLUE key KP9 has been defined
 
      

This command assigns the unterminated command string "SET BREAK %LINE" to keypad key 9 for the BLUE state. After pressing BLUE-KP9, you can enter a line number and then press the Return key to terminate and process the SET BREAK command.

#3

DBG> SET KEY/STATE=DEFAULT
%DEBUG-I-SETKEY, keypad state has been set to DEFAULT
DBG> DEFINE/KEY/SET_STATE=RED/LOCK_STATE F12 ""
%DEBUG-I-DEFKEY, DEFAULT key F12 has been defined
 
      

In this example, the SET KEY command establishes DEFAULT as the current state. The DEFINE/KEY command makes the F12 key (on an LK201 keyboard) a state key. Pressing F12 while in the DEFAULT state causes the current state to become RED. The key definition is not terminated and has no other effect (a null string is assigned to F12). After pressing F12, you can enter "RED" commands by pressing keys that have definitions associated with the RED state.


DEFINE/PROCESS_SET

Assigns a symbolic name to a list of process specifications.

Format

DEFINE/PROCESS_SET process-set-name =process-spec[,...]


Parameters

process-set-name

Specifies a symbolic name to be assigned to a list of process specifications. The symbolic name can be composed of alphanumeric characters and underscores. The debugger converts lowercase alphabetic characters to uppercase. The first character must not be a number. The symbolic name must be no more than 31 characters long.

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.

If you do not specify a process, the symbolic name is created but contains no process entries.


Description

The DEFINE/PROCESS_SET command assigns a symbol to a list of process specifications. You can then use the symbol in any command where a list of process specifications is allowed.

The DEFINE/PROCESS_SET command does not verify the existence of a specified process. This enables you to specify processes that do not yet exist.

To identify a symbol that was defined with the DEFINE/PROCESS_SET command, use the SHOW SYMBOL/DEFINED command. To delete a symbol that was defined with the DEFINE/PROCESS_SET command, use the DELETE command.

Related commands:

DELETE
(SET,SHOW) DEFINE
SHOW SYMBOL/DEFINED

Examples

#1

all> DEFINE/PROCESS_SET SERVERS=FILE_SERVER,NETWORK_SERVER
all> SHOW PROCESS SERVERS
 Number  Name               State   Current PC 
*    1 FILE_SERVER          step    FS_PROG\%LINE 37 
     2 NETWORK_SERVER       break   NET_PROG\%LINE 24
all>
      

This DEFINE/PROCESS_SET command assigns the symbolic name SERVERS to the process set consisting of FILE_SERVER and NETWORK_SERVER. The SHOW PROCESS SERVERS command displays information about the processes that make up the set SERVERS.

#2

all> DEFINE/PROCESS_SET G1=%PROCESS_NUMBER 1,%VISIBLE_PROCESS
all> SHOW SYMBOL/DEFINED G1
defined G1 
    bound to: "%PROCESS_NUMBER 1, %VISIBLE_PROCESS" 
    was defined /process_set
all> DELETE G1
 
      

This DEFINE/PROCESS_SET command assigns the symbolic name G1 to the process set consisting of process 1 and the visible process (process 3). The SHOW SYMBOL/DEFINED G1 command identifies the defined symbol G1. The DELETE G1 command deletes the symbol from the DEFINE symbol table.

#3

all> DEFINE/PROCESS_SET A = B,C,D
all> DEFINE/PROCESS_SET B = E,F,G
all> DEFINE/PROCESS_SET E = I,J,A
%DEBUG-E-NORECSYM, recursive PROCESS_SET symbol definition 
     encountered at or near "A"
 
      

This series of DEFINE/PROCESS_SET commands illustrate valid and invalid uses of the command.


DELETE

Deletes a symbol definition that was established with the DEFINE command.

Format

DELETE [symbol-name[,...]]


Parameters

symbol-name

Specifies a symbol whose definition is to be deleted from the DEFINE symbol table. Do not use the asterisk (*) wildcard character. Instead, use the /ALL qualifier. Do not specify a symbol name with /ALL. If you use the /LOCAL qualifier, the symbol specified must have been previously defined with the DEFINE/LOCAL command. If you do not specify /LOCAL, the symbol specified must have been previously defined with the DEFINE command without /LOCAL.

Qualifiers

/ALL

Deletes all global DEFINE definitions. Using /ALL/LOCAL deletes all local DEFINE definitions associated with the current command procedure (but not the global DEFINE definitions).

/LOCAL

Deletes the (local) definition of the specified symbol from the current command procedure. The symbol must have been previously defined with the DEFINE/LOCAL command.

Description

The DELETE command deletes either a global DEFINE symbol or a local DEFINE symbol. A global DEFINE symbol is defined with the DEFINE command without the /LOCAL qualifier. A local DEFINE symbol is defined in a debugger command procedure with the DEFINE/LOCAL command, so that its definition is confined to that command procedure.

Related commands:

DECLARE
DEFINE
SHOW DEFINE
SHOW SYMBOL/DEFINED

Examples

#1

DBG> DEFINE X = INARR, Y = OUTARR
DBG> DELETE X,Y
      

In this example, the DEFINE command defines X and Y as global symbols corresponding to INARR and OUTARR, respectively. The DELETE command deletes these two symbol definitions from the global symbol table.

#2

DBG> DELETE/ALL/LOCAL
      

This command deletes all local symbol definitions from the current command procedure.


DELETE/KEY

Deletes a key definition that was established with the DEFINE/KEY command or, by default, by the debugger.

Note

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

Format

DELETE/KEY [key-name]


Parameters

key-name

Specifies a key whose definition is to be deleted. Do not use the asterisk (*) wildcard character. Instead, use the /ALL qualifier. Do not specify a key name with /ALL. Valid key names are as follows:
Key Name LK201 Keyboard VT100-type VT52-type
PF1 PF1 PF1 Blue
PF2 PF2 PF2 Red
PF3 PF3 PF3 Black
PF4 PF4 PF4  
KP0--KP9 Keypad 0--9 Keypad 0--9 Keypad 0--9
PERIOD Keypad period (.) Keypad period (.)  
COMMA Keypad comma (,) Keypad comma (,)  
MINUS Keypad minus (-) Keypad minus (-)  
ENTER Enter ENTER ENTER
E1 Find    
E2 Insert Here    
E3 Remove    
E4 Select    
E5 Prev Screen    
E6 Next Screen    
HELP Help    
DO Do    
F6--F20 F6--F20    


Qualifiers

/ALL

Deletes all key definitions in the specified state. If you do not specify a state, all key definitions in the current state are deleted. To specify one or more states, use /STATE=state-name.

/LOG (default)

/NOLOG

Controls whether a message is displayed indicating that the specified key definitions have been deleted. The /LOG qualifier (which is the default) displays the message. The /NOLOG qualifier suppresses the message.

/STATE=(state-name [,...])

/NOSTATE (default)

Selects one or more states for which a key definition is to be deleted. The /STATE qualifier deletes key definitions for the specified states. You can specify predefined key states, such as DEFAULT and GOLD, or user-defined states. A state name can be any appropriate alphanumeric string. The /NOSTATE qualifier deletes the key definition for the current state only.

By default, the current key state is the DEFAULT state. The current state can be changed with the SET KEY/STATE command, or by pressing a key that causes a state change (a key that was defined with DEFINE/KEY/LOCK_STATE/SET_STATE).


Description

The DELETE/KEY command is like the DCL command DELETE/KEY.

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

Related commands:

DEFINE/KEY
(SET,SHOW) KEY

Examples

#1

DBG> DELETE/KEY KP4
%DEBUG-I-DELKEY, DEFAULT key KP4 has been deleted
 
      

This command deletes the key definition for KP4 in the state last set by the SET KEY command (by default, this is the DEFAULT state).

#2

DBG> DELETE/KEY/STATE=(BLUE,RED) COMMA
%DEBUG-I-DELKEY, BLUE key COMMA has been deleted 
%DEBUG-I-DELKEY, RED key COMMA has been deleted
 
      

This command deletes the key definition for the COMMA key in the BLUE and RED states.


DEPOSIT

Changes the value of a program variable. More generally, deposits a new value at the location denoted by an address expression.

Format

DEPOSIT address-expression = language-expression


Parameters

address-expression

Specifies the location into which the value of the language expression is to be deposited. With high-level languages, this is typically the name of a variable and can include a path name to specify the variable uniquely. More generally, an address expression can also be a memory address or a register and can be composed of numbers (offsets) and symbols, as well as one or more operators, operands, or delimiters. For information about the debugger symbols for the registers and about the operators you can use in address expressions, see the Built_in_Symbols and Address_Expressions help topics.

You cannot specify an entire aggregate variable (a composite data structure such as an array or a record). To specify an individual array element or a record component, follow the syntax of the current language.

language-expression

Specifies the value to be deposited. You can specify any language expression that is valid in the current language. For most languages, the expression can include the names of simple (noncomposite, single-valued) variables but not the names of aggregate variables (such as arrays or records). If the expression contains symbols with different compiler-generated types, the debugger uses the rules of the current language to evaluate the expression.

If the expression is an ASCII string or an assembly-language instruction, you must enclose it in quotation marks (") or apostrophes ('). If the string contains quotation marks or apostrophes, use the other delimiter to enclose the string.

If the string has more characters (1-byte ASCII) than can fit into the program location denoted by the address expression, the debugger truncates the extra characters from the right. If the string has fewer characters, the debugger pads the remaining characters to the right of the string by inserting ASCII space characters.


Qualifiers

/ASCIC

/AC

Deposits a counted ASCII string into the specified location. You must specify a quoted string on the right-hand side of the equal sign. The deposited string is preceded by a 1-byte count field that gives the length of the string.

/ASCID

/AD

Deposits an ASCII string into the address given by a string descriptor that is at the specified location. You must specify a quoted string on the right-hand side of the equal sign. The specified location must contain a string descriptor. If the string lengths do not match, the string is either truncated on the right or padded with space characters on the right.

/ASCII:n

Deposits n bytes of an ASCII string into the specified location. You must specify a quoted string on the right-hand side of the equal sign. If its length is not n, the string is truncated or padded with space characters on the right. If you omit n, the actual length of the data item at the specified location is used.

/ASCIW

/AW

Deposits a counted ASCII string into the specified location. You must specify a quoted string on the right-hand side of the equal sign. The deposited string is preceded by a 2-byte count field that gives the length of the string.

/ASCIZ

/AZ

Deposits a zero-terminated ASCII string into the specified location. You must specify a quoted string on the right-hand side of the equal sign. The deposited string is terminated by a zero byte that indicates the end of the string.

/BYTE

Deposits a 1-byte integer into the specified location.

/D_FLOAT

Converts the expression on the right-hand side of the equal sign to the D_floating type (length 8 bytes) and deposits the result into the specified location.

/DATE_TIME

Converts a string representing a date and time (for example, 21-DEC-1988 21:08:47.15) to the internal format for date and time and deposits that value (length 8 bytes) into the specified location. Specify an absolute date and time in the following format:


[dd-mmm-yyyy[:]] [hh:mm:ss.cc] 

/EXTENDED_FLOAT

/X_FLOAT

(Alpha only) Converts the expression on the right-hand side of the equal sign to the IEEE X_floating type (length 16 bytes) and deposits the result into the specified location.

/FLOAT

On Alpha, converts the expression on the right-hand side of the equal sign to the IEEE T_floating type (double precision, length 8 bytes) and deposits the result into the specified location.

/G_FLOAT

Converts the expression on the right-hand side of the equal sign to the G_floating type (length 8 bytes) and deposits the result into the specified location.

/LONG_FLOAT

/S_FLOAT

(Integrity servers and Alpha only) Converts the expression on the right-hand side of the equal sign to the IEEE S_floating type (single precision, length 4 bytes) and deposits the result into the specified location.

/LONG_LONG_FLOAT

/T_FLOAT

(Integrity servers and Alpha only) Converts the expression on the right-hand side of the equal sign to the IEEE T_floating type (double precision, length 8 bytes) and deposits the result into the specified location.

/LONGWORD

Deposits a longword integer (length 4 bytes) into the specified location.

/OCTAWORD

Deposits an octaword integer (length 16 bytes) into the specified location.

/PACKED:n

Converts the expression on the right-hand side of the equal sign to a packed decimal representation and deposits the resulting value into the specified location. The value of n is the number of decimal digits. Each digit occupies one nibble (4 bits).

/QUADWORD

Deposits a quadword integer (length 8 bytes) into the specified location.

/TASK

Applies to tasking (multithread) programs. Deposits a task value (a task name or a task ID such as %TASK 3) into the specified location. The deposited value must be a valid task value.

/TYPE=(name)

Converts the expression to be deposited to the type denoted by name (which must be the name of a variable or data type declared in the program), then deposits the resulting value into the specified location. This enables you to specify a user-declared type. You must use parentheses around the type expression.

/WCHAR_T[:n]

Deposits up to n longwords (n characters) of a converted multibyte file code sequence into the specified location. The default is 1 longword. You must specify a string on the right-hand side of the equal sign.

When converting the specified string, the debugger uses the locale database of the process in which the debugger runs. The default is C locale.

/WORD

Deposits a word integer (length 2 bytes) into the specified location.

Description

You can use the DEPOSIT command to change the contents of any memory location or register that is accessible in your program. For high-level languages the command is used mostly to change the value of a variable (an integer, real, string, array, record, and so on).

The DEPOSIT command is like an assignment statement in most programming languages. The value of the expression specified to the right of the equal sign is assigned to the variable or other location specified to the left of the equal sign. For Ada and Pascal, you can use ":=" instead of "=" in the command syntax.

The debugger recognizes the compiler-generated types associated with symbolic address expressions (symbolic names declared in your program). Symbolic address expressions include the following entities:

In general, when you enter a DEPOSIT command, the debugger takes the following actions:

The debugger might do type conversion during a deposit operation if the language rules allow it. For example, a real value specified to the right of the equal sign might be converted to an integer value if it is being deposited into a location with an integer type. In general, the debugger tries to follow the assignment rules for the current language.

There are several ways of changing the type associated with a program location so that you can deposit data of a different type into that location:

When debugging a C program, or a program in any case-specific language, you cannot use the DEPOSIT/TYPE command if the type specified is a mixed or lowercase name. For example, suppose the program has a function like the following:


Previous Next Contents Index