|
OpenVMS Delta/XDelta Debugger Manual
This command changes the current address (. symbol) to the contents of
the opened location. A subsequent Close Location command does not
change the current address. However, a subsequent Close Current
Location and Open Next command (ESC or LINEFEED) executes as follows:
- Writes any new-exp specified
- Closes the location opened by the / command
- Adds the number of bytes (defined by the prevailing display width
mode) to the address just opened with the / command
- Changes the current address to the new value
- Opens the new location and displays the contents
The display mode remains hexadecimal until the next Open Location and
Display Contents in Instruction Mode (!) command or Open Location and
Display Contents in ASCII Mode (") command.
In DELTA, not XDELTA, processes having the CMKRNL privilege can examine
the address space of any existing process. Use pid to
specify the internal PID of the process you want to examine. For
example, use the following command to view address location 402 in the
process with a PID of 00010010:
On Alpha, DELTA also permits the examination of general purpose
registers in another process. The PID specifies the internal PID of the
process you want to examine. For example, use the following command to
examine R5 in the process with a PID of 00010010:
Example
R0,R9/00000001
R1/00000000
R2/00000226
R3/7FF2AD94
R4/000019B4
R5/00000000
R6/7FF2AA49
R7/8001E4DD
R8/7FFED052
R9/7FFED25A
|
Contents of all the general registers R0 through R9 are displayed.
! (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. Refer to your operating system's
System Dump Analyzer Utility Manual for more information about SDA commands.
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:
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 MACRO instruction.
Description
The Open Location and Display Contents in Instruction Mode command
displays the contents of a location or range of locations as a MACRO
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.
Example
The following example applies only to OpenVMS VAX.
69B!BRB 0000067A (1)
!CLRQ -(SP) (2)
|
- 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.
Example
The following example applies only to OpenVMS Alpha.
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.
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 MACRO instructions, a
series of register values, or a series of values on the stack.
The values in the symbol Q and the symbol . are changed automatically.
Example
The following example applies only to OpenVMS VAX.
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.
Example
The following example applies only to OpenVMS Alpha.
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.
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 Alpha and VAX, 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.
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.
Example
The following example applies only to OpenVMS VAX.
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.
Example
The following example applies only to OpenVMS Alpha.
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.
" (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.
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, the same is true for the commands that are specific to this
implementation, as follow:
On Alpha and VAX, you can also use the Return key as an ASCII character
in a quoted string. Refer to the Deposit ASCII String command (').
;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, 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, the format of the display differs slightly, as shown in
the following example:
Brk n at address
address!decoded-instruction
|
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, the CPU ID is displayed as a decimal number with no leading
zeros.
On Alpha and VAX, 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 Alpha and VAX, 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)
|
|