OpenVMS Debugger Manual


Previous Contents Index


Appendix B
Built-In Symbols and Logical Names

This appendix identifies all the debugger built-in symbols and logical names.

B.1 SS$_DEBUG Condition

SS$_DEBUG (defined in SYS$LIBRARY:STARLET.OLB) is a condition you can signal from your program to start the debugger. Signaling SS$_DEBUG from your program is equivalent to pressing Ctrl/Y followed by the DCL command DEBUG at that point.

You can pass commands to the debugger at the time you signal it with
SS$_DEBUG. The commands you want the debugger to execute should be specified as you would enter them at the DBG> prompt. Multiple commands should be separated by semicolons. The commands should be passed by reference as an ASCIC string. See your language documentation for details on constructing an ASCIC string.

For example, to start the debugger and enter a SHOW CALLS command at a given point in your program, you can insert the following code in your program (BLISS example):


LIB$SIGNAL(SS$_DEBUG, 1, UPLIT BYTE(%ASCIC 'SHOW CALLS')); 

You can obtain the definition of SS$_DEBUG at compile time from the appropriate STARLET or SYSDEF file for your language (for example, STARLET.L32 for BLISS or FORSYSDEF.TLB for Fortran). You can also obtain the definition of SS$_DEBUG at link time in SYS$LIBRARY:STARLET.OLB (this method is less desirable).

B.2 Logical Names

The following table identifies debugger-specific logical names:
Logical
Name
Description
DBG$DECW$DISPLAY Applies only to workstations running HP DECwindows Motif for OpenVMS. Specifies the debugger interface (HP DECwindows Motif for OpenVMS or command) or the display device. Default: DBG$DECW$DISPLAY is either undefined or has the same definition as the applicationwide logical name DECW$DISPLAY.

See Section 9.8.3 for information about using DBG$DECW$DISPLAY to override the debugger's default interface in the HP DECwindows Motif for OpenVMS environment.
DBG$IMAGE_DSF_PATH (Alpha and Integrity servers only) Specifies the directory that contains the .DSF (debug symbol table) files of the image being debugged. The file name of each .DSF file must be the same as the file name of the image being debugged. See Section 5.1.5 for more information about creating .DSF files.
DBG$INIT Specifies your debugger initialization file. Default: no debugger initialization file. DBG$INIT accepts a full or partial file specification as well as a search list. See Section 13.2 for information about debugger initialization files.
DBG$INPUT Specifies the debugger input device. Default: SYS$INPUT. See Section 14.2 for information about using DBG$INPUT and DBG$OUTPUT to debug screen-oriented programs at two terminals.

DBG$INPUT is ignored in the HP DECwindows Motif for OpenVMS user interface (see DBG$DECW$DISPLAY). You can use DBG$INPUT if you are displaying the debugger's command interface in a DECterm window.
DBG$OUTPUT Specifies the debugger output device. Default: SYS$OUTPUT. See Section 14.2 for information about using DBG$INPUT and DBG$OUTPUT to debug screen-oriented programs at two terminals.

DBG$OUTPUT is ignored in the HP DECwindows Motif for OpenVMS user interface (see DBG$DECW$DISPLAY). You can use DBG$OUTPUT if you are displaying the debugger's command interface in a DECterm window.
SSI$AUTO_ACTIVATE (Alpha only) Specifies whether system service interception (SSI) is enabled. If you are having trouble with your watchpoints, disable SSI with the DCL command
 $DEFINE SSI$AUTO_ACTIVATE OFF

See SET WATCH for more information about the interaction between static watchpoints, ASTs, and system service interception.

Use the DCL command DEFINE or ASSIGN to assign values to these logical names. For example, the following command specifies the location of the debugger initialization file:


$ DEFINE DBG$INIT DISK$:[JONES.COMFILES]DEBUGINIT.COM

Note the following points about the logical name DBG$INPUT. If you plan to debug a program that takes its input from a file (for example, PROG_IN.DAT) and your debugger input from the terminal, establish the following definitions before starting the debugger:


$ DEFINE SYS$INPUT PROG_IN.DAT
$ DEFINE/PROCESS DBG$INPUT 'F$LOGICAL("SYS$COMMAND")

That is, define DBG$INPUT to point to the translation of SYS$COMMAND. If you define DBG$INPUT to point to SYS$COMMAND, the debugger tries to get its input from the file PROG_IN.DAT.

B.3 Built-In Symbols

The debugger's built-in symbols provide options for specifying program entities and values.

Most of the debugger built-in symbols have a percent sign (%) prefix.

The following symbols are described in this appendix:

B.3.1 Specifying Registers

The debugger built-in symbol for a Alpha or Integrity server register is the register name preceded by the percent sign (%). When specifying a register symbol, you can omit the percent sign (%) prefix if your program has not declared a symbol with the same name.

You can examine the contents of all the registers. You can deposit values into all the registers except for SP. Use caution when depositing values into FP.

Table B-1 identifies the Alpha register symbols.

Table B-1 Debugger Symbols for Alpha Registers (Alpha Only)
Symbol Description
Alpha Integer Registers
%R0...%R28 Registers R0...R28
%FP (%R29) Stack frame base register (FP)
%SP (%R30) Stack pointer (SP)
%R31 ReadAsZero/Sink (RZ)
%PC Program counter (PC)
%PS Processor status register (PS). The built-in symbols %PSL and %PSW are disabled for Alpha processors.
Alpha Floating-Point Registers
%F0...%F30 Registers F0...F30
%F31 ReadAsZero/Sink

The debugger does not provide a screen-mode register display.

On Alpha processors:

See Section 4.4 and Section 4.4.1 for more information about the Alpha general registers.

Table B-2 identifies the Integrity server register symbols.

Table B-2 Debugger Symbols for Integrity server Registers (Integrity servers Only)
Symbol Description
I64 Application Registers
%KR0...%KR7 Kernel registers 0...7
%RSC (%AR16) Register Stack Configuration
%BSP (%AR17) Backing Store Pointer
%BSPSTORE (%AR18) Backing Store Pointer for Memory Stores
%RNAT (%AR19) RSE NaT Collection
%CCV ($AR32) Compare and Exchange Compare Value
%UNAT (%AR36) User NaT Collection
%FPSR (%AR40) Floating-point Status
%PFS (%AR64) Previous Function State
%LC (%AR65) Loop Count
%EC (%AR66) Epilog Count
%CSD Code Segment
%SSD Stack Segment
Control Registers
%DCR (%CR0) Default Control
%ITM (%CR1) Interval Timer Match (only visible for SCD)
%IVA (%CR2) Interruption Vector Address (only visible for SCD)
%PTA (%CR8) Page Table Address (only visible for SCD)
%PSR (%CR9, %ISPR) Interruption Processor Status
%ISR (%CR17) Interruption Status
%IIP (%CR19) Interruption Instruction Pointer
%IFA (%CR20) Interruption Faulting Address
%ITIR (%CR21) Interruption TLB Insertion
%IIPA (%CR22) Interruption Instruction Previous
%IFS (%CR23) Interruption Function State
%IIM (%CR24) Interruption Immediate
%IHA (%CR25) Interruption Hash Address
%LID (%CR64) Local Interrupt ID (only visible for SCD)
%TPR (%CR66) Task Priority (only visible for SCD)
%IRR0...%IRR3 (%CR68...%CR71) External Interrupt Request 0...3 (only visible for SCD)
%ITV (%CR72) Interval Timer (only visible for SCD)
%PMV (%CR73) Performance Monitoring (only visible for SCD)
%CMCV (%CR74) Corrected Machine Check Vector (only visible for SCD)
%IRR0 and %IRR1 (%CR80 and %CR81) Local Redirection 0:1 (only visible for SCD)
Special Registers
%IH (%SR0) Invocation Handle
%PREV_BSP Previous Backing Store Pointer
%PC (%IP) Program Counter (Instruction Pointer | slot number)
%RETURN_PC Return Program Counter
%CFM Current Frame Marker
%NEXT_PFS Next Prefious Frame State
%PSP Previous Stack Pointer
%CHFCTX_ADDR Condition Handling Facility Context Address
%OSSD Operating System Specific Data
%HANDLER_FV Handler Function Value
%LSDA Language Specific Data Area
%UM User Mask
Predicate Registers
%PR (%PRED) Predicate Collection Register---Collection of %P0...%P63
%P0...%P63 Predicate (single-bit)Registers 0...63
Branch Registers
%RP (%B0) Return Pointer
%B1...%B7 Branch Registers 1...7
General Integer Registers
%R0 General Integer Register 0
%GP (%R1) Global Data Pointer
%R2...%R11 General Integer Registers 2...11
%SP (%R12) Stack Pointer
%TP (%R13) Thread Pointer
%R14...%R24 General Integer Registers 14...24
%AP (%R25) Argument Information
%R26...%R127 General Integer Registers 26...127
Output Registers
%OUT0...%OUT7 Output Registers, runtime aliases (i.e., If the frame has allocated output registers, then %OUT0 maps to the first allocated output registers, for example, %R38, etc.)
General Registers
%GRNAT0 and %GRNAT1 General Register Not A Thing (NAT) collection registers 64 bits each, for example, %GRNAT0<3,1,0> is the NAT bit for %R3.
Floating Point Registers
%F0...%F127 Floating Poing Registers 0...127

See Section 4.4 and reference (I64_reg_status_sec) for more information about the Integrity server registers.

B.3.2 Constructing Identifiers

The %NAME built-in symbol enables you to construct identifiers that are not ordinarily legal in the current language. The syntax is as follows:

%NAME 'character-string'

In the following example, the variable with the name '12' is examined:


DBG> EXAMINE %NAME '12'

In the following example, the compiler-generated label P.AAA is examined:


DBG> EXAMINE %NAME 'P.AAA'

B.3.3 Counting Parameters Passed to Command Procedures

You can use the %PARCNT built-in symbol within a command procedure that accepts a variable number of actual parameters (%PARCNT is defined only within a debugger command procedure).

%PARCNT specifies the number of actual parameters passed to the current command procedure. In the following example, command procedure ABC.COM is invoked and three parameters are passed:


DBG> @ABC 111,222,333

Within ABC.COM, %PARCNT now has the value 3. %PARCNT is then used as a loop counter to obtain the value of each parameter passed to ABC.COM:


DBG> FOR I = 1 TO %PARCNT DO (DECLARE X:VALUE; EVALUATE X)

B.3.4 Determining the Debugger Interface (Command or HP DECwindows Motif for OpenVMS)

The %DECWINDOWS built-in symbol enables you to determine whether the debugger's HP DECwindows Motif for OpenVMS or command interface was displayed. When the HP DECwindows Motif for OpenVMS user interface is being used, the value of %DECWINDOWS is 1 (TRUE). When the command interface is being used, the value of %DECWINDOWS is 0 (FALSE). For example:


DBG> EVALUATE %DECWINDOWS
0

The following example shows how to use %DECWINDOWS in a debugger initialization file to position the debugger source window, SRC, at debugger startup:


IF %DECWINDOWS THEN 
      ! DECwindows Motif (workstation) syntax: 
      (DISPLAY SRC AT (100,300,100,700)) 
   ELSE 
      ! Screen-mode (terminal) syntax: 
      (DISPLAY SRC AT (AT H1)) 

B.3.5 Controlling the Input Radix

The built-in symbols %BIN, %DEC, %HEX, and %OCT can be used in address expressions and language expressions to specify that an integer literal that follows (or all integer literals in a parenthesized expression that follows) should be interpreted in binary, decimal, hexadecimal, or octal radix, respectively. Use these radix built-in symbols only with integer literals. For example:


DBG> EVALUATE/DEC %HEX 10
16
DBG> EVALUATE/DEC %HEX (10 + 10)
32
DBG> EVALUATE/DEC %BIN 10
2
DBG> EVALUATE/DEC %OCT (10 + 10)
16
DBG> EVALUATE/HEX %DEC 10
0A
DBG> SET RADIX DECIMAL
DBG> EVALUATE %HEX 20 + 33 ! Treat 20 as hexadecimal, 33 as decimal 
65                         ! Resulting value is decimal
DBG> EVALUATE %HEX (20+33) ! Treat both 20 and 33 as hexadecimal 
83
DBG> EVALUATE %HEX (20+ %OCT 10 +33) ! Treat 20 and 33 as 
91                                   ! hexadecimal and 10 as octal
DBG> SYMBOLIZE %HEX 27C9E3  ! Symbolize a hexadecimal address 
DBG> DEPOSIT/INST %HEX 5432 = 'MOVL ^O%DEC 222, R1'
DBG> ! Treat address 5432 as hexadecimal, and operand 222 as decimal


Previous Next Contents Index