HP OpenVMS Delta/XDelta Debugger Manual


Previous Contents Index

1.8.1 Requesting Interrupts on VAX

On VAX 8530, 8550, 8600, 8650, 8810 (8700), 8820, 8820-N (8800), 8830, 8840, VAX-11/780, or VAX-11/785 computers, enter the following commands at the console terminal to request the interrupt:


$ [Ctrl/P]
>>> HALT
>>> D/I 14 E
>>> C

For a VAX 9000 computer, enter the following commands at the console terminal to request the interrupt:


$ [Ctrl/P]
>>> HALT/CPU=ALL
>>> D/I 14 E
>>> C/CPU=ALL

For a VAX 6000 series, 8200, 8250, 8300, 8350, VAX-11/730, or a VAX-11/750 computer, enter the following commands:


$ [Ctrl/P]
>>> D/I 14 E
>>> C

For a VAXstation 3520 or 3540 computer, perform the following steps:

  1. Press and release the Halt button on the CPU control panel. When you release the Halt button, make sure it is popped out or the system will remain halted. You can also press the Break key (if enabled) on the console terminal.
  2. Enter the following commands:


    >>> D/I 14 E
    >>> C/ALL
    

For a VAXft-3000, VAXft-410, VAXft-610, or VAXft-612 computer, enter the following commands at the console terminal to request the interrupt:


$  [Break] or [F5] 
>>> HALT
>>> D/I 14 E
>>> CONT
>>> PIO

For a VAX 7000 or VAX 10000 series computer, enter the following commands at the console terminal to request the interrupt. If you are operating in secure mode, first set the keyswitch to ENABLE before entering these commands.


$  [Ctrl/P]
>>> D IPR:14 E
>>> CONT

For a VAXstation 2000, MicroVAX 2000, MicroVAX 3300/3400 series, MicroVAX or VAXstation 3500/3600 series, MicroVAX 3800/3900 series, VAX 4000 series, or MicroVAX II computer, perform the following steps:

  1. Press and release the Halt button on the CPU control panel. When you release the Halt button, make sure it is popped out or the system will remain halted. You can also press the Break key (if enabled) on the console terminal.
  2. Enter the following commands:


    >>> D/I 14 E
    >>> C
    

For an alternative method of accessing OpenVMS through a lower priority interrupt, see the HP OpenVMS System Manager's Manual.

1.8.2 Requesting Interrupts on Alpha

On Alpha systems, perform the following steps to request an interrupt:

  1. Halt the processor with the following command:


     ^P 
    

  2. Request an IPL 14 software interrupt with the following command:


    >>> DEP SIRR E
    

    This command deposits a 1410 into the software interrupt request register.

  3. Reactivate the processor by issuing the CONTINUE command as follows:


    >>> CONT
    

The process should enter XDELTA as soon as IPL drops to 14.

The following message is displayed:


Brk 0 at address
address! instruction

At this point, the exception frame is on the stack. The saved PC/PS in the exception frame tells you where you were in the program when you requested the interrupt.

1.8.3 Requesting Interrupts on I64

To request an interrupt on I64, type CTRL/P on the console terminal. Note that XDELTA must have been loaded previously.

When you press CTRL/P, the system is halted at the current PC and at the current IPL. The system must be executing below IPL 8. When the system reaches this state, execution is suspended at the PC that was executing at the time of the interrupt.

1.9 Accessing the Initial Breakpoint

When debugging a program, you can set a breakpoint in the code so that XDELTA gains control of program execution.

To set a breakpoint, place a call to the system routine INI$BRK in the source code.

On systems that are booted with XDELTA, the INI$BRK routine executes a breakpoint instruction. On systems that are not booted with XDELTA, INI$BRK is effectively a NOP instruction.

You can use the INI$BRK routine as a debugging tool, placing calls to this routine in any part of the source code you want to debug.

On VAX, the instruction following the breakpoint is RSB. After the break is taken, the return address (the address in the program to which control returns when you proceed from the breakpoint) is on the top of the stack.

The following command calls the INI$BRK system routine to reach the breakpoint:


JSB G^INI$BRK 

On Alpha, the instruction following the breakpoint is JSR R31,(R26). After the break is taken, the return address (the address in the program to which control returns when you proceed from the breakpoint) is in R26.

On I64, simply step until you reach a br.ret instruction.

The following C routine calls the INI$BRK system routine to reach the breakpoint:


extern void ini$brk(void); 
 
main() 
{ 
 ini$brk(); 
} 
 

1.10 Proceeding from Initial XDELTA Breakpoints

On VAX, when XDELTA reaches one of its breakpoints, it displays the following message:


1 BRK AT nnnnnnnn
 
address/instruction operands
 
 

On I64 and Alpha, when XDELTA reaches one of its breakpoints, it displays the following message:


BRK 1 AT nnnnnnnn
 
address!instruction operands
 
 

On multiprocessor computers, the XDELTA breakpoint is taken on the processor upon which the XDELTA software interrupt was requested, which is generally the primary processor.

At this point, XDELTA is waiting for input. If you want to proceed with program execution, enter the ;P command. If you want to do step-by-step program execution, enter the S command. If you know where you have set breakpoints, examine them using the ;B command. You can also set additional breakpoints or modify existing ones.

If you entered the ;P command to proceed with program execution and the system halts with a fatal bugcheck, the system prints the bugcheck information on the console terminal. Bugcheck information consists of the following:

The contents of the program counter (PC) and the stack indicate where the failure was detected. Then, if the system parameter BUGREBOOT was set to 0, XDELTA issues a prompt. You can examine the system's state further by entering XDELTA commands.

1.11 Exiting from XDELTA

XDELTA remains in memory with the operating system until you reboot without it.


Chapter 2
DELTA and XDELTA Symbols and Expressions

This chapter describes how to form the symbolic expressions used as arguments to many DELTA and XDELTA commands.

2.1 Symbols Supplied by DELTA and XDELTA

DELTA and XDELTA define symbols that are useful in forming expressions and referring to registers.

Table 2-1 DELTA/XDELTA Symbols for OpenVMS I64 systems
Symbol Description
. The address of the current location. The value of this symbol is set by the Open Location and Display Contents (/), Open Location and Display Instruction (!), and the Open Location and Display Indirect (TAB) commands.
ARn Application register n where n can range from 0 to 127 (decimal). Also see the P(ipr) symbol description.
BRn Branch register n where n can range from 0 to 7.
CRn Control register n where n can range from 0 to 127 (decimal). See also the P(ipr) symbol description.
FPn Floating point register n, where n can range from 0 to 127 (decimal).
FPSR The floating point status register.
G ^XFFFFFFFF80000000, the prefix for system space addresses.
H ^X7FFE0000, the prefix for addresses in the control region (P1 space). H2E, for example, is equivalent to ^X7FFE002E.
P(ipr) The OpenVMS I64 software implementation of an Alpha internal processor register whose name is ipr. See the Alpha Architecture Reference Manual for the names and descriptions of these processor registers. Not all Alpha internal processor registers are implemented on OpenVMS I64.

This syntax is also used to refer to Intel Itanium application and control registers using meaningful names, where ipr is the name of the Intel Itanium register. For example, you can refer to Intel Itanium register CR20 using either of the following:

P(IFA)
P(CR.IFA)

See the Intel® IA-64 Architecture Software Developer's Manual, Volume 2: IA-64 System Architecture manual for the names of the application and control registers.

PC The OpenVMS I64 software implementation of a program counter register, formed by the union of the IP (instruction bundle pointer) and the slot offset (PSR.ri).
pid:Rn General register n in the process specified by process ID pid.
PS The processor status register.
Pn Predicate register n where n can range from 0 to 63 (decimal).
Q The last value displayed. The value of Q is set by every command that causes DELTA or XDELTA to display the contents of memory or the value of an expression.
Rn General register n where n can range from 0 to 127 (decimal).
Xn Base register n, where n can range from 0 to 15 (decimal). These registers are used for storing values, most often the base addresses of data structures in memory.

For XDELTA only, X14 and X15 contain the addresses of two command strings that XDELTA stores in memory. See the Execute Command String (;E) command for more information.

For XDELTA only, registers X4 and X5 contain specific addresses. X4 contains the address of the location that contains the PCB address of the current process on the current processor. The address that X4 contains is that of the per-CPU database for the current processor. X5 contains SCH$GL_PCBVEC, the symbolic address of the start of the PCB vector, and the list of PCB slots.

Table 2-2 DELTA/XDELTA Symbols for OpenVMS Alpha systems
Symbol Description
. The address of the current location. The value of this symbol is set by the Open Location and Display Contents (/), Open Location and Display Instruction (!), and the Open Location and Display Indirect (TAB) commands.
FPn Floating point register n, where n can range from 0 to 31 (decimal).
FPCR The floating point control register.
G ^XFFFFFFFF80000000, the prefix for system space addresses.
H ^X7FFE0000, the prefix for addresses in the control region (P1 space). H2E, for example, is equivalent to ^X7FFE002E.
PC The program counter register.
pid:PC The program counter in the process specified by process ID pid.
PS The processor status register.
Q The last value displayed. The value of Q is set by every command that causes DELTA or XDELTA to display the contents of memory or the value of an expression.
pid:Rn General register n in the process specified by process ID pid.
Rn General register n, where n can range from 0 to 31 (decimal).
Xn Base register n, where n can range from 0 to 15 (decimal). These registers are used for storing values, most often the base addresses of data structures in memory.

For XDELTA only, X14 and X15 contain the addresses of two command strings that XDELTA stores in memory. See the Execute Command String (;E) command for more information.

For XDELTA only, registers X4 and X5 contain specific addresses. X4 contains the address of the location that contains the PCB address of the current process on the current processor. The address that X4 contains is that of the per-CPU database for the current processor. X5 contains SCH$GL_PCBVEC, the symbolic address of the start of the PCB vector, and the list of PCB slots.

Table 2-3 DELTA/XDELTA Symbols for OpenVMS VAX systems
Symbol Description
. The address of the current location. The value of this symbol is set by the Open Location and Display Contents (/), Open Location and Display Instruction (!), and the Open Location and Display Indirect (TAB) commands.
G ^X80000000, the prefix for system space addresses. G2E, for example, is equivalent to ^X8000002E.
H ^X7FFE0000, the prefix for addresses in the control region (P1 space). H2E, for example, is equivalent to ^X7FFE002E.
Pn The internal processor register at processor address n, where n can range from 0 to 3F (hexadecimal). See the VAX Architecture Reference Manual for a description of these processor registers.
Q The last value displayed. The value of Q is set by every command that causes DELTA or XDELTA to display the contents of memory or the value of an expression.
Rn General register n, where n can range from 0 to F (hexadecimal). RF+4 is the processor status longword (PSL), RE is the stack pointer, and RF is the program counter (PC).
Xn Base register n, where n can range from 0 to F (hexadecimal). These registers are used for storing values, most often the base addresses of data structures in memory.

For XDELTA only, XE and XF contain the addresses of two command strings that XDELTA stores in memory. See the Execute Command String (;E) command for more information.

For XDELTA only, registers X4 and X5 contain specific addresses. X4 contains the address of the location that contains the PCB address of the current process on the current processor. The address that X4 contains is that of the per-CPU database for the current processor. X5 contains SCH$GL_PCBVEC, the symbolic address of the start of the PCB vector, and the list of PCB slots.

2.2 Floating Point Register Support

On OpenVMS Alpha, floating point registers can be accessed from DELTA and from XDELTA but only if floating point arithmetic is enabled in the current process. On OpenVMS I64, floating point registers FP6 through FP11 are always available. The other floating point registers are available if floating point arithmetic is enabled in the current process.

DELTA runs in the context of a process. On OpenVMS Alpha, access to floating-point registers is enabled as soon as the first floating point instruction in the code being examined is executed. Access is disabled as soon as that image completes execution. On OpenVMS I64, floating-point registers are always available to DELTA.

Table Table 2-4 shows these relationships:

Table 2-4 Floating Point Register Support by Platform
  Alpha I64
XDELTA No access FP6---FP11
DELTA FPn if FP access is enabled Always available

When the system enters XDELTA, it may not be obvious which process is the current process. If the current process happens to have floating point enabled (because a floating point instruction has executed and the image containing the floating point instruction is still executing), then you can access the floating point registers. Otherwise, you cannot. XDELTA checks the FEN (floating point enable) IPR (internal processor register) to see whether it needs to provide access to floating point registers.

2.3 Forming Numeric Expressions

Expressions are combinations of numbers, symbols that have numeric values, and arithmetic operators.

On all platforms, DELTA and XDELTA store and display all numbers in hexadecimal. They also interpret all numbers as hexadecimal.

Expressions are formed using regular (infix) notation. Both DELTA and XDELTA ignore operators that trail the expression. The following is a typical expression (in hexadecimal):


G4A32+24 
DELTA and XDELTA evaluate expressions from left to right. No operator takes precedence over any other.

DELTA and XDELTA recognize five binary arithmetic operators, one of which also acts as a unary operator. They are listed in Table 2-5.

Table 2-5 Arithmetic Operators
Operator Action
+ or SPACE Addition
- Subtraction when used as a binary operator, or negation when used as a unary operator
* Multiplication
% Division
@ Arithmetic shift

The following example shows the arguments required by the arithmetic-shift operator:

n@j

In this example, n is the number to be shifted, and j is the number of bits to shift it. If j is positive, n is shifted to the left; if j is negative, n is shifted to the right. Argument j must be less than 2016 and greater than -2016. Bits shifted beyond the limit of the longword are lost; therefore, the result must fit into a longword.

Note

Do not enter unnecessary spaces, as DELTA/XDELTA treats the space as an additional operator.


Previous Next Contents Index