[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS Delta/XDelta Debugger Manual


Previous Contents Index


! (exclamation mark)---Open Location and Display Contents in Instruction Mode

Displays an instruction and its operands.

Format

[pid:][start-addr-exp][,end-addr-exp] !


Arguments

pid

The internal process identification (PID) of a process you want to access. If you specify zero, or do not specify any PID, the default process is the current process. This argument cannot be used with XDELTA.

Subsequent open location and display contents commands, issued after using the pid argument, display the contents of the location of the specified process until you specify another PID with this command.

You can obtain the internal PID of processes by running the System Dump Analyzer utility (SDA). Use the SDA command SHOW SUMMARY to determine the external PID. Then use the SDA command SHOW PROCESS/INDEX to determine the internal PID. For more information about SDA commands, see your operating system's System Dump Analyzer Utility Manual.

start-addr-exp

The address of the instruction, or the first address of the range of instructions, to display. If you do not specify this parameter, the address displayed is that currently specified by Q (last quantity displayed). When you want to view just one location, the syntax is as follows:

start-addr-exp!

end-addr-exp

The address of the last instruction in the range to display. When you want to view several instructions, the syntax is as follows:

start-addr-exp,end-addr-exp!

Each location within the range is displayed with the address, a slash (/), and the machine instruction.


Description

The Open Location and Display Contents in Instruction Mode command displays the contents of a location or range of locations as a machine instruction. DELTA/XDELTA does not make any distinction between reasonable and unreasonable instructions or instruction streams.

This command does not allow you to modify the contents of the location. The command sets a flag that causes subsequent Close Current Location and Display Next (LINEFEED) and Open Location and Display Indirect Location (TAB) commands to display MACRO instructions. You can clear the flag by using the Open Location and Display Contents (/) command, which displays the contents of the location as a hexadecimal number, or Open Location and Display Contents in ASCII Mode ("), which displays the contents of the location in ASCII.

When an address appears as an instruction's operand, DELTA/XDELTA sets the Q symbol to that address. Then enter ! again to go to the address specified in the instruction operand. DELTA/XDELTA changes Q only for operands that use program-counter or branch-displacement addressing modes; Q is not altered for operands that use literal and register addressing modes. This feature is useful for branches that follow.

The following examples illustrate the command on each OpenVMS platform.


Examples

I64 example:


G0BF5D60!       add         r33 = 0008, r33 ;;      (1)
80BF5D62!       nop.i       000000 ;;        (2)
80BF5D70!       ld4         r2 = [r2] ;;
80BF5D71!       nop.m       000000
80BF5D72!       sxt4        r2 = r2 ;;
80BF5D80!       cmp.eq      p14, p0 = r2, r0
80BF5D81!       nop.f       000000
80BF5D82! (p14) br.cond.dpnt.few.clr 0000030 ;;
80BF5D90!       ld8         r14 = [r2], 008 ;;
80BF5D91!       nop.m       000000
80BF5D92!       mov         b7 = r14 ;;
80BF5DA0!       ld8         r1 = [r2]

  1. The instruction at the base address G0BF5D60 is displayed using the ! command. XDELTA displays an add instruction.
  2. After typing a LINEFEED command, XDELTA displays the next instruction location and the instruction at that address, and so on.

Alpha example:


30000!       LDA         SP,#XFFE0(SP) (1)
00030004!     BIS         R31,R31,R18 (2)
  1. The instruction at address 30000 is displayed using the ! command. DELTA/XDELTA displays a LDA instruction. Note that unlike on a VAX computer, an absolute address never appears in an instruction operand. So the value of Q has no use after an instruction display.
  2. After typing a LINEFEED command, DELTA/XDELTA displays the next instruction location and the instruction at that address.

VAX example:


69B!BRB    0000067A (1)
!CLRQ     -(SP)     (2)

  1. The instruction at address 69B is displayed using the ! command. DELTA/XDELTA displays a branch instruction and sets Q (last address location displayed) to the branch address 67A.
  2. The instruction at address 67A is displayed using the ! command. The value of Q is used as the address location.

" (double quote)---Open Location and Display Contents in ASCII

Displays the contents of a location as an ASCII string.

Format

[pid:] start-addr-exp[,end-addr-exp] "


Arguments

pid

The internal process identification (PID) of a process you want to access. If you specify zero, or do not specify any PID, the default process is the current process. This argument cannot be used with XDELTA.

Subsequent open location and display contents commands issued after using the pid argument, display the contents of the location of the specified process until you specify another PID with this command.

You can obtain the internal PID of processes by running the System Dump Analyzer utility (SDA). Use the SDA command SHOW SUMMARY to determine the external PID. Then use the SDA command SHOW PROCESS/INDEX to determine the internal PID. For more information about SDA commands, see your operating system's System Dump Analyzer Utility Manual.

start-addr-exp

The address of the location, or the start of a range of locations, to be displayed. If you want to view one location, the syntax is as follows:

start-add-exp"

end-addr-exp

The last address within a range of locations to be viewed. If you want to view a series of locations, the syntax is as follows:

start-add-exp,end-addr-exp"


Description

The Open Location and Display Contents in ASCII command opens the location or range of locations at start-addr-exp and displays the contents in ASCII format. This command does not change the width of the display (byte, word, longword) from the prevailing mode. If the prevailing mode is word mode, two ASCII characters are displayed; if byte mode, one character is displayed.

The display mode remains ASCII until you enter the next Open Location and Display Contents command (/) or Open Location and Display Contents in Instruction Mode command (!). These commands change the display mode to hexadecimal or instruction, respectively.

You can modify the contents of the locations, starting at start-addr-exp, with the Deposit ASCII string (') command.


Example



235FC2 [W/415A   (1)
235FC2" ZA       (2)     [Linefeed]  (3)
235FC4/PP

  1. The current display mode is word (displays one word in hexadecimal).
  2. The " command changes the prevailing display mode to ASCII but does not affect the width of the display.
  3. The next Close Current Location, Open Next command (LINEFEED), determines the address of the location to open by adding the width, in bytes, to the value contained in the symbol . (the current address). Then it opens the number of bytes equal to the width of the prevailing display mode, which in this example is two bytes.
    The ASCII representation of the contents of the location presents the bytes left to right, while the hexadecimal representation presents them right to left.

' (single quote)---Deposit ASCII String

Deposits the ASCII string at the current address.

Format

'string'


Arguments

string

The string of characters to be deposited.

Description

The Deposit ASCII String command deposits string at the current location (.) in ASCII format. The second apostrophe is required to terminate the string. All characters typed between the first and second apostrophes are entered as ASCII character text. Avoid embedding an apostrophe (') within the string you want to deposit.

When you want to use key commands (LINEFEED, RETURN, ESC, or TAB), press the key. These commands are entered as text.

This command stores the characters in 8-bit bytes and increments the current address (.) by one for each character stored.

This command does not change the prevailing display mode.


Example



7FFE1600/'R0/[Linefeed][Linefeed]'

The ASCII string "R0/[Linefeed] [Linefeed]" is stored at address 7FFE1600. This string, if subsequently executed with the ;E command, examines the contents of general register 0 (the command R0/), then examines two subsequent registers (using two LINEFEED commands).


= (equal sign)---Display Value of Expression

Evaluates an expression and displays its value.

Format

expression =


Argument

expression

The expression to be evaluated.

Description

The Display Value of Expression command evaluates an expression and displays its value in hexadecimal. The expression can be any valid DELTA/XDELTA expression. See Section 2.1 for a description of DELTA/XDELTA expressions.

All calculations and displays are in hexadecimal in the prevailing length mode.

Note

Because DELTA and XDELTA treat the space as an addition operator, do not enter an unnecessary space.

Example


FF+1=00000100  (1)
A-1=00000009   (2)
  1. FF16 and 116 are added together. DELTA/XDELTA displays the sum in hexadecimal.
  2. 116 is subtracted from A16. DELTA/XDELTA displays the result in hexadecimal.

\string\---Immediate mode text display command (I64 and Alpha Only)

Displays the ASCII text string enclosed in backslashes.

Format

\string\


Description

This mode is useful when creating your own predefined command strings. Use the backslash to begin and end an ASCII text string. Follow the ending backslash with a terminator. When DELTA or XDELTA encounters the ending backslash and terminator, it prints the ASCII text string.

ESC (Escape key)---Open Location and Display Previous Location

Opens the previous location and displays its contents.

Format

ESC


Description

The Open Location and Display Previous Location command decrements the location counter (.) by the width (in bytes) of the prevailing display mode, opens that many bytes, and displays the contents on a new line. The address of the location is displayed on the new line in the prevailing mode, followed by a slash (/) and the contents of that address.

On VAX, this command is ignored if the prevailing display mode is instruction mode (set by the ! command).

On all platforms, use this command to move backwards through a series of locations. Set the address where you want to start (for example, with the / command). Then press the ESC key repeatedly to display each preceding location. ESC is echoed as a dollar sign ($) on the terminal.

On keyboards without a separate ESC key, press Ctrl/3 or the escape key sequence that you defined on your keyboard. The ESC key on LK201 keyboards (VT220, VT240, VT340, and workstation keyboards) generates different characters and cannot be used for the ESC command. You must use Ctrl/3.


Example



R1/00000000 (1)  $  (2)  [ESC]
R0/00000001

  1. The contents of general register 1 are displayed using the / command.
  2. The contents of general register 0, the location prior to general register 1, are displayed by pressing ESC.

EXIT---Exit from DELTA Debugging Session

Terminates the DELTA debugging session. Use with DELTA only.

Format

EXIT


Description

Use the EXIT command to terminate a DELTA debugging session. You cannot use EXIT in XDELTA.

You may have to enter EXIT twice, such as when your program terminates execution by the $EXIT system service or by the Return key (to DCL).


LINEFEED (Linefeed key or Ctrl/J)---Close Current Location, Open Next Location

Closes the currently open location and opens the next location, displaying its contents.

Format

LINEFEED


Description

The Close Current Location Open Next command closes the currently open location, then opens the next and displays its contents. This command accepts no arguments, and thus can only be used to open the next location. It is useful for examining a series of locations one after another. First, set the location where you want to start (for example, with the / or (!) command). Then, press the Linefeed key repeatedly to examine each successive location.

The LINEFEED command displays the contents of the next location in the prevailing display mode and display width. If the current display mode is hexadecimal (the / command was used) and the display width is word, the next location displayed is calculated by adding a word to the current location. Its contents are displayed in hexadecimal. If the current display mode is instruction, the next location displayed is the next instruction, and the contents are displayed as a MACRO instruction.

On keyboards without a separate Linefeed key, press CTRL/J. The Linefeed key on LK201 keyboards (VT220, VT240, VT340, and workstation keyboards) generates different characters and cannot be used for the LINEFEED command. You must use CTRL/J.

This command is useful for displaying a series of machine instructions, a series of register values, or a series of values on the stack or in memory.

The values in the symbol Q and the symbol . are changed automatically.

The following examples illustrate the command on each OpenVMS platform.


Examples

I64 example:


G0BF5D60!       add         r33 = 0008, r33 ;;   (1)
80BF5D62!       nop.i       000000 ;;            (2)
80BF5D71!       nop.m       000000
80BF5D72!       sxt4        r2 = r2 ;;
80BF5D80!       cmp.eq      p14, p0 = r2, r0
80BF5D81!       nop.f       000000
80BF5D82! (p14) br.cond.dpnt.few.clr 0000030 ;;
80BF5D90!       ld8         r14 = [r2], 008 ;;
80BF5D91!       nop.m       000000
80BF5D92!       mov         b7 = r14 ;;
80BF5DA0!       ld8         r1 = [r2]

  1. The instruction at the base address G0BF5D60 is displayed using the ! command. XDELTA displays an add instruction.
  2. Ten successive instructions are displayed by pressing the Linefeed key twelve times. The LINEFEED command is not echoed on the terminal.

Alpha example:



30000!          LDA             SP,#XFFE0(SP)  (1)
00030004!       BIS             R31,R31,R18  (2)
00030008!       STQ             R27,(SP)
0003000C!       BIS             R31,R31,R19
00030010!       STQ             R26,#X0008(SP)
00030014!       BIS             R31,#X04,R25

  1. Instruction at address 30000 is displayed using the ! command.
  2. Five successive instructions are displayed by pressing the Linefeed key five times. The LINEFEED command is not echoed on the terminal.

VAX example:


6B9!CLRQ          -(SP) (1)  [Linefeed] (2)
000006BB/CLRQ     -(SP)  [Linefeed]
000006BD/PUSHL   X1+002E  [Linefeed]
000006C1/PUSHAL X1+003A  [Linefeed]
000006C5/CLRQ    -(SP)  [Linefeed]
000006C7/PUSHL   #00
  1. Instruction at address 6B9 is displayed using the ! command.
  2. Five successive instructions are displayed by pressing the Linefeed key five times. The LINEFEED command is not echoed on the terminal.

RETURN (Return or Enter key)--- Close Current Location

Closes a location that has been opened by one of the open location and display contents commands.

Format

RETURN


Description

If you have opened a location with one of the open location and display contents commands (/, LINEFEED, ESC, TAB, !, or "), press the Return key to close the location. Use this command to make sure that a specific location has not been left open with the possibility of being overwritten.

You also press the Return key to terminate the following DELTA/XDELTA commands:

  • ;X
  • ;E
  • ;G
  • ;P
  • ;B
  • ;M
  • 'string'
  • ;L
  • EXIT (DELTA only)

On I64 and Alpha, the same is true for the commands that are specific to this implementation, as follow:

  • ;Q
  • ;C
  • ;D
  • ;H
  • ;I
  • ;T (I64 only)
  • ;W
  • \string\

On all platforms, you can also use the Return key as an ASCII character in a quoted string. See the Deposit ASCII String command (').


TAB (Tab key)---Open Location and Display Indirect Location

Opens the location addressed by the contents of the current location and displays its contents.

Format

TAB


Description

The Open Location and Display Indirect Location command opens the location addressed by the contents of the current location and displays the contents of the addressed location on a new line. The display is in the prevailing display mode. This command is useful for examining data structures that have been placed in a queue, or the operands of instructions.

To execute this command, press the Tab key.

This command changes the current address (.) to the location displayed.

This command does not affect the display mode.

The following examples illustrate the command on each OpenVMS platform.


Examples

I64, Alpha, and VAX example:


10000/00083089  (1)

00010004/00000000  (2)

00010008/00030000  (3)
00030000/23DEFFE0
  1. The contents of location 10000 are displayed using the / command.
  2. The subsequent two locations are displayed using the LINEFEED command.
  3. After displaying the contents of location 10008 (30000), the TAB command is used to display the contents of location 30000.

VAX example:



69B!BRB    0000067A    (1) [Tab]
0000067A/CLRQ    -(SP) (2)

  1. The instruction at 69B is displayed using the ! command. DELTA/XDELTA displays a branch instruction.
  2. The instruction at the address referred to by the branch instruction is displayed by pressing the Tab key. DELTA/XDELTA displays the instruction at address 67A.

;B---Breakpoint

Shows, sets, and clears breakpoints.

Format

[addr-exp][,n][,display-addr-exp][,cmd-string-addr] ;B


Arguments

addr-exp

The address where you want the breakpoint.

n

The number to assign to the breakpoint. If you omit a number, DELTA/XDELTA assigns the first unused number to the breakpoint; if all numbers are in use, DELTA/XDELTA displays the error message, "Eh?".

On VAX, for XDELTA, the range is from 2 to 8. For XDELTA, breakpoint 1 is reserved for INI$BRK. For DELTA, the range is from 1 to 8.

On I64 and Alpha, for XDELTA, the range is from 1 to 8. For DELTA, the range is from 1 to 8.

display-addr-exp

The address of a location, the contents of which are to be displayed in hexadecimal in the prevailing width mode when the breakpoint is encountered. Omit this argument by specifying zero or two consecutive commas. If omitted, DELTA/XDELTA displays only the instruction that begins at the specified address.

cmd-string-addr

The address of the string of DELTA/XDELTA commands to execute when this breakpoint is encountered. See the Execute Command String (;E) command. DELTA/XDELTA displays the information requested before executing the string of commands associated with complex breakpoints. You must have previously deposited the string of commands using the ' command or have coded the string into an identifiable location in your program. If omitted, DELTA/XDELTA executes no commands automatically and waits for you to enter commands interactively.

Description

The breakpoint command shows, sets, and clears breakpoints. The action of this command depends on the arguments used with it. Each action is described below.

Displaying Breakpoints

To show all the breakpoints currently set, enter ;B. For each breakpoint, DELTA/XDELTA displays the following information:

  • Number of the breakpoint
  • Address of the breakpoint
  • Address of a location the contents of which will be displayed when the breakpoint is encountered
  • Address of the command string associated with this breakpoint (for complex breakpoints, see the section called "Setting Complex Breakpoints" in this Description)

Setting Simple Breakpoints

To set a breakpoint, enter an address expression followed by ;B. Then press the Return key, as follows:


addr-exp;B[Return]

DELTA/XDELTA sets a breakpoint at the specified location and assigns it the first available breakpoint number.

When DELTA/XDELTA reaches the breakpoint, it completes the following actions:

  • Suspends instruction execution.
  • Sets a flag to change the display mode to instruction mode. Any subsequent Close Current Location, Open Next (LINEFEED) commands, and Open and Display Indirect Location (TAB) commands will display locations as machine instructions.
  • On VAX, the following message is displayed, listing the number of the breakpoint, the address of the breakpoint, and the instruction stored at the breakpoint location:


    n BRK at address
    
    address/decoded-instruction
    

    On I64 and Alpha, the format of the display differs slightly, as shown in the following example:


     Brk n at address [on CPUn] [new mode =]
     [new IPL =]
    
     address!decoded-instruction
    
    
  • On I64 and Alpha systems, if the interrupt priority level (IPL) has changed, the new IPL is printed (XDELTA only). Also on I64 and Alpha systems, if the processor mode has changed, the new mode is printed (both XDELTA and DELTA).

If you are using XDELTA in a multiprocessor environment, the CPU ID of the processor where the break was taken is also displayed.

On VAX, the CPU ID is displayed as a 2-digit hexadecimal number.

On I64 and Alpha, the CPU ID is displayed as a decimal number with no leading zeros.

On all platforms, after the breakpoint message is displayed, you can enter other DELTA/XDELTA commands. You can reset the flag that controls the mode in which instructions are displayed by entering the Open Location and Display Contents (/) command.

Setting a Breakpoint and Assigning a Number to It

To set a breakpoint and assign it a number, enter the address where you want the breakpoint, a comma, a single digit for the breakpoint number, a semicolon (;), the letter B, and then press the Return key.


Previous Next Contents Index