|
HP OpenVMS Delta/XDelta Debugger Manual
- 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.
- The instruction at address 67A is displayed
using the ! command. The value of Q is used as the address location.
Alpha example:
30000! LDA SP,#XFFE0(SP) (1)
00030004! BIS R31,R31,R18 (2)
|
- 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.
- After typing a LINEFEED command, DELTA/XDELTA
displays the next instruction location and the instruction at that
address.
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]
|
- The instruction at the base address G0BF5D60
is displayed using the ! command. XDELTA displays an add instruction.
- After typing a LINEFEED command, XDELTA
displays the next instruction location and the instruction at that
address, and so on.
" (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. Refer to your operating system's
System Dump Analyzer Utility Manual for more information about SDA commands.
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:
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
|
- The current display mode is word (displays
one word in hexadecimal).
- The " command changes the prevailing display
mode to ASCII but does not affect the width of the display.
- 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.
ESC (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
|
- The contents of general register 1 are
displayed using the / command.
- 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 (Close Current Location, Open Next)
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
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
|
- Instruction at address 6B9 is displayed using
the ! command.
- Five successive instructions are displayed by
pressing the Linefeed key five 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
|
- Instruction at address 30000 is displayed
using the ! command.
- Five successive instructions are displayed by
pressing the Linefeed key five times. The LINEFEED command is not
echoed on the terminal.
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]
|
- The instruction at the base address G0BF5D60
is displayed using the ! command. XDELTA displays an add instruction.
- Ten successive instructions are displayed by
pressing the Linefeed key twelve times. The LINEFEED command is not
echoed on the terminal.
RETURN (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 Alpha and I64, 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. Refer to the Deposit ASCII String command (').
TAB (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
VAX example:
69B!BRB 0000067A (1) [Tab]
0000067A/CLRQ -(SP) (2)
|
- The instruction at 69B is displayed using the
! command. DELTA/XDELTA displays a branch instruction.
- 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.
VAX, Alpha, and I64 example:
10000/00083089 (1)
00010004/00000000 (2)
00010008/00030000 (3)
00030000/23DEFFE0
|
- The contents of location 10000 are displayed
using the / command.
- The subsequent two locations are displayed
using the LINEFEED command.
- After displaying the contents of location
10008 (30000), the TAB command is used to display the contents of
location 30000.
;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 Alpha and I64, 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. Refer to 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, refer to the section in this Description called
Setting Complex Breakpoints)
Setting Simple Breakpoints
To set a breakpoint, enter an address expression followed by ;B. Then
press the Return key, as follows:
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 Alpha and I64, 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 Alpha and I64 systems, if the interrupt priority level (IPL)
has changed, the new IPL is printed (XDELTA only). Also on Alpha and
I64 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 Alpha and I64, 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.
For example, if you wanted to set breakpoint 4 at address 408, the
command is as follows:
DELTA/XDELTA sets a breakpoint at the specified location and assigns it
the specified breakpoint number.
Clearing Breakpoints
To clear a breakpoint, enter zero (0), followed by a comma, the number
of the breakpoint to remove, a semicolon (;), the letter B, and then
press the Return key. DELTA/XDELTA clears the specified breakpoint. For
example, if you wanted to clear breakpoint 4, the command is as follows:
On VAX, when using XDELTA, do not clear breakpoint 1. If you do, any
calls to INI$BRK in your program will not result in entry into XDELTA.
Setting Complex Breakpoints
On all platforms, a complex breakpoint completes one or more of the
following actions:
- Always displays the next instruction to be executed
- Optionally displays the contents of another, specified location
- Optionally executes a string of DELTA/XDELTA commands stored in
memory
To use the complex breakpoint, you must first create the string of
DELTA commands you want executed. Then deposit those commands at a
memory location with the Deposit ASCII String command (').
To set a complex breakpoint, use the following syntax:
addr-exp,n,display-addr-exp,cmd-string-addr;B
|
Example
;B
1 00000690
2 00000699 (1)
0,2;B (2)
;B
1 00000690 (3)
;P (4)
|
- Two breakpoints have already been set and are
displayed. Using ;B, DELTA/XDELTA displays each breakpoint number and
the address location of each breakpoint.
- Breakpoint 2 is cleared.
- Current breakpoints are displayed. Because
breakpoint 2 has been cleared, DELTA/XDELTA displays just breakpoint 1.
- Program execution is continued using the ;P
command.
Displaying Breakpoints in a Multithreaded Application
To support the debugging of multithreaded applications, DELTA has the
capability of displaying a thread ID at a breakpoint. When DELTA
reaches a breakpoint in a multithreaded application, DELTA displays the
thread ID and stops the execution of all other threads. (When DELTA
reaches a breakpoint in a single-threaded application, the display and
behavior is the same as in the past; DELTA displays the address and
stops program execution.)
In the following example, a breakpoint is set in a multithreaded
application with 30000;B and is followed by the ;P (Proceed from
Breakpoint) command. The breakpoint is taken. Because it is a
multithreaded application, the thread ID is included in the display.
30000;B ;P
Brk 1 at 30000 on Thread 12
00030000! LDA SP,#XFF80(SP)
|
|