DELTA/XDELTA Debugger Manual
- Operating System and Version:
- VSI OpenVMS IA-64 Version 8.4-1H1 or higher
VSI OpenVMS Alpha Version 8.4-2L1 or higher
VSI OpenVMS x86-64 Version 9.2-1 or higher
Preface
This manual describes the OpenVMS DELTA and XDELTA debuggers. OpenVMS DELTA is used to debug
programs that run in privileged processor mode at interrupt priority level 0.
OpenVMS XDELTA is used to debug system software that runs at an elevated interrupt priority
level.
1. About VSI
VMS Software, Inc. (VSI) is an independent software company licensed by Hewlett Packard Enterprise to develop and support the OpenVMS operating system.
2. Intended Audience
This manual is written for programmers who debug system code for device drivers and other images that execute in privileged processor-access modes or at an elevated interrupt priority level (IPL).
3. VSI Encourages Your Comments
You may send comments or suggestions regarding this manual or any VSI document by sending electronic mail to the following Internet address: <docinfo@vmssoftware.com>. Users who have VSI OpenVMS support contracts through VSI can contact <support@vmssoftware.com> for help with this product.
4. OpenVMS Documentation
The full VSI OpenVMS documentation set can be found on the VMS Software Documentation webpage at https://docs.vmssoftware.com.
5. Typographical Conventions
The following conventions are used in this manual:
| Convention | Meaning |
|---|---|
| Ctrl/x | A sequence such as Ctrl/x indicates that you must hold down the key labeled Ctrl while you press another key or a pointing device button. |
| PF1 x | A sequence such as PF1 x indicates
that you must first press and release the key labeled PF1 and then press and release another
key (x) or a pointing device button. |
... |
A horizontal ellipsis in examples indicates one of the following possibilities:
|
. . . | A vertical ellipsis indicates the omission of items from a code example or command format; the items are omitted because they are not important to the topic being discussed. |
| ( ) | In command format descriptions, parentheses indicate that you must enclose choices in parentheses if you specify more than one. |
| [ ] | In command format descriptions, brackets indicate optional choices. You can choose one or more items or no items. Do not type the brackets on the command line. However, you must include the brackets in the syntax for directory specifications and for a substring specification in an assignment statement. |
| | | In command format descriptions, vertical bars separate choices within brackets or braces. Within brackets, the choices are optional; within braces, at least one choice is required. Do not type the vertical bars on the command line. |
| { } | In command format descriptions, braces indicate required choices; you must choose at least one of the items listed. Do not type the braces on the command line. |
| bold type | Bold type represents the name of an argument, an attribute, or a reason. Bold type also represents the introduction of a new term. |
| italic type | Italic type indicates important information, complete titles of manuals, or variables. Variables include information that varies in system output (Internal error number), in command lines (/PRODUCER=name), and in command parameters in text (where dd represents the predefined code for the device type). |
| UPPERCASE TYPE | Uppercase type indicates a command, the name of a routine, the name of a file, or the abbreviation for a system privilege. |
Example |
This typeface indicates code examples, command examples, and interactive screen displays. In text, this type also identifies website addresses, UNIX commands and pathnames, PC-based commands and folders, and certain elements of the C programming language. |
- | A hyphen at the end of a command format description, command line, or code line indicates that the command or statement continues on the following line. |
| numbers | All numbers in text are assumed to be decimal unless otherwise noted. Nondecimal radixes—binary, octal, or hexadecimal—are explicitly indicated. |
Chapter 1. Invoking, Exiting, and Setting Breakpoints
Privileges required for running DELTA
Guidelines for using XDELTA
Invoking and terminating DELTA and XDELTA debugging sessions on OpenVMS systems
Booting XDELTA, requesting interrupts, and accessing initial breakpoints on OpenVMS systems
1.1. Overview of the DELTA and XDELTA Debuggers
The DELTA and XDELTA debuggers are used to monitor the execution of user programs and the OpenVMS operating system. They use the same commands and the same expressions, but they differ in how they operate. DELTA operates as an exception handler in a process context. XDELTA is invoked directly from the hardware SCB vector in a system context.
Use DELTA to debug process-context programs that execute at interrupt priority level (IPL) 0 in any processor mode. You cannot use DELTA to debug code that executes at an elevated IPL. To debug with DELTA, invoke it from within your process by specifying it as the debugger (as opposed to the symbolic debugger).
Use XDELTA to debug system software executing in any processor mode or at any IPL level. Because XDELTA is not process specific, it is not invoked from a process. To debug with XDELTA, you must boot the processor with commands to include XDELTA in memory. XDELTA's existence terminates when you reboot the processor without XDELTA.
1.2. Privileges Required for Running DELTA
No privileges are required to run DELTA to debug a program that runs in user mode. To debug a program that runs in other processor-access modes, the process in which you run the program must have the necessary privileges.
To use the ;M command, your process must have change-mode-to-kernel
(CMKRNL) privilege. The ;M command sets all processes writable.
To use the ;L command
(List All Loaded Executive Modules), you must have change-mode-to-executive (CMEXEC) privilege.
1.3. Guidelines for Using XDELTA
Because XDELTA is not process specific, privileges are not required.
When using XDELTA, you must use the console terminal. You should run XDELTA only on a standalone system because all breakpoints are handled at IPL 31.
You cannot redirect output from XDELTA. To determine if your system maintains a log file,
check your hardware manual. You can produce a log of console sessions by connecting the
console serial port of the system that will boot with XDELTA to the serial port of a LAT
server. Then, from another system, use the command SET HOST/LAT/LOG to that
LAT port.
1.4. Restrictions for XDELTA on OpenVMS IA-64 Systems
CPUID
Debug Data Break Registers
Debug Instruction Break Registers
Region Registers
Protection Key Registers
Instruction Translation Registers
Data Translation Registers
Device Interrupt Control Register
1.5. Invoking DELTA
- Define DELTA as the default debugger instead of the symbolic debugger with the following command:
$ DEFINE LIB$DEBUG SYS$LIBRARY:DELTA
- Use the following
RUNcommand to execute your program:$ RUN/DEBUG MYPROG
When DELTA begins execution, it displays its name and the first executable instruction in the program with which it is linked. It displays the address of that instruction and a separator – an exclamation point (!).
VSI OpenVMS Industry Standard 64 DELTA Debugger Brk 0 at address address! instruction operands
OpenVMS Alpha DELTA Debugger Brk 0 at address address! instruction operands
VSI VMS X86 DELTA Debugger YMM0-15: Present, ZMM0-15: Present, X/Y/ZMM16-31: Present Brk 0 at address address! instruction operands
DELTA is then ready for your commands.
Note
The image activator on OpenVMS Alpha systems automatically activates
SYS$SHARE:SYS$SSISHR.EXE when an image is debugged using the
RUN/DEBUG command or is linked using the /DEBUG
qualifier. The presence of this image should not alter your program's correctness, but if
your program is sensitive to virtual address layout or if for some reason
SYS$SHARE:SYS$SSISHR.EXE is not installed properly on your
system, you may want to bypass its automatic activation.
To keep the image activator from activating
SYS$SHARE:SYS$SSISHR.EXE for you, define the logical name
SSI$AUTO_ACTIVATE to be OFF before running the
program to be debugged with DELTA.
1.6. Exiting from DELTA
To exit from DELTA, type EXIT and press the Return key.
When you are in user mode, you exit DELTA and your process remains. When you are in a
privileged access mode, your process can be deleted.
1.7. Invoking XDELTA
On x86-64, there are two types of XDELTA:
- XDELTA is compiled into the primary bootstrap program SYSBOOT.EXE for use during the early boot stages where the system is transitioning from physical to virtual addressing. To invoke this early XDELTA, issue the following commands prior to booting:
BOOTMGR> XDELTA BOOTMGR> BREAK
This will enable the debugger and take the first available breakpoint inside SYSBOOT.EXE. - XDELTA (SYSDBG) also exists as a loadable executive image. This allows it to be used on programs that run in virtual address space including drivers. To invoke the loadable XDELTA, issue the following commands prior to booting:
BOOTMGR> SYSDBG BOOTMGR> BREAK
This will load the debugger and take the first available breakpoint inside EXECINIT.EXE. If you prefer to take breakpoints inside program modules, insertini$brk()calls in your sources.
To proceed from the initial breakpoint, use the following command:
;P
/R5 qualifier with the boot
command. The /R5 qualifier enters a value for a flag that controls the way
XDELTA is loaded. The flag is a 32-bit hexadecimal integer loaded into R5 as input to VMB.EXE,
the primary boot program. For a description of the valid values for this flag, see Table 1.1, ''Boot Command Qualifier Values''. Note
When you deposit a boot command qualifier value in R5, make sure that any other values you would normally deposit are included. For example, if you were depositing the number of the system root directory from which you were booting and an XDELTA value, R5 would contain both values.
>>> BOOT -FLAG 0,6
fs0:\efi\vms\> vms_loader -fl 0,6
IPB.EXE on IA-64 and APB.EXE on Alpha. For a
description of the valid values for this flag, see Table 1.1, ''Boot Command Qualifier Values''.|
Value |
Description |
|---|---|
|
0 |
Normal, nonstop boot (default) |
|
1 |
Stop in SYSBOOT |
|
2 |
Include XDELTA, but do not take the initial breakpoint |
|
3 |
Stop in SYSBOOT, include XDELTA, but do not take the initial breakpoint |
|
6 |
Include XDELTA, and take the initial breakpoint |
|
7 |
Include XDELTA, stop in SYSBOOT, and take the initial breakpoint at system initialization |
1.8. Requesting an Interrupt
On IA-64 and Alpha, if you set the boot control flag to 6, XDELTA will stop at an initial breakpoint during the system boot process. You can then set other breakpoints or examine locations in memory.
Your program can also call the routine INI$BRK, which in turn executes the first XDELTA breakpoint. For the breakpoint procedure, see Section 1.9, ''Accessing the Initial Breakpoint''.
Once loaded into memory, XDELTA can also be invoked at any time from the console by requesting a software interrupt. For example, you might need to use a software interrupt to enter XDELTA if your program is in an infinite loop or no INI$BRK call had been made.
On IA-64 and Alpha, INI$BRK is defined as XDELTA's breakpoint 0. It is not possible to clear breakpoint 0 from any code being debugged in XDELTA.
For boot flag setting on x86-64, please refer to the VSI OpenVMS x86-64 Boot Manager User Guide.
To enable XDELTA at the Boot Manager on x86-64, use the following command:
BOOTMGR> SYSDBG ENABLED: Loading of late XDELTA {SYSTEM_DEBUG} Execlet BOOTMGR> BREAK ENABLED: XDELTA Initial Breakpoint. BOOTMGR>
1.8.1. Requesting Interrupts on Alpha
- Halt the processor with the following command:
^P
- Request an IPL 14 software interrupt with the following command:
>>> DEP SIRR E
This command deposits a 14 10 into the software interrupt request register.
- Reactivate the processor by issuing the
CONTINUEcommand as follows:>>> CONT
The process should enter XDELTA as soon as IPL drops to 14.
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.2. Requesting Interrupts on IA-64 and x86-64
To request an interrupt on IA-64 or x86-64, 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 21. 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.
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 IA-64, simply step until you reach a br.ret instruction.
extern void ini$brk(void);
main()
{
ini$brk();
}On x86-64, the BREAK command takes the first available breakpoint inside
either SYSBOOT.EXE (if you are using XDELTA during early boot stages) or EXECINIT.EXE (if you
are using XDELTA on programs that run in virtual address space). If you prefer to take
breakpoints inside program modules, insert ini$brk() calls in your
sources.
1.10. Proceeding from Initial XDELTA Breakpoints
Brk 0 at FFFF8300.06802620 FFFF8300.06802620!retq
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.
;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:Type of bugcheck
Contents of the registers
A dump of one or more stacks
A list of loaded executive images
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
Table 2.1, ''DELTA/XDELTA Symbols for OpenVMS x86-64 Systems'' shows the symbols that pertain to the OpenVMS x86-64 systems.
Table 2.2, ''DELTA/XDELTA Symbols for OpenVMS IA-64 Systems '' shows the symbols that pertain to the OpenVMS IA-64 systems.
Table 2.3, ''DELTA/XDELTA Symbols for OpenVMS Alpha Systems'' shows symbols that pertain to the OpenVMS Alpha systems.
| Symbol | Description |
|---|---|
| ARnn | Displays the XMACRO Alpha register set.? |
| Raa | Mnemonic access access to quadword register set (RAX, RBX, RCX, etc.) |
| Rnn | Legacy syntax used to access x86-64 quadword register set using register number. (R0 = RAX, R1 = RBX, R2 = RCX, R3 = RDX, R4 = RSI, R5 = RDI, R6 = RBP, R7 = RSP, etc.) |
| %CRnn? |
The %CRnn registers are not currently implemented on x86-64 and will display the value of 0xDEADDEAD.DEADDEAD. |
| %TSC? | The Time Stamp Counter register that is constantly changing. Each access to the register will yield an updated value. |
For a full list of registers supported on x86-64, refer to Section 2.3, ''Registers Supported on x86-64''.
| 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. The ARnn/ command is used to displays the Application registers set. |
|
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 |
|
|
H |
|
|
P(ipr) |
The OpenVMS IA-64 software implementation of an Alpha internal
processor register whose name is 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:
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 IA-64 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
( 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. |
| Symbol | Description |
|---|---|
|
. |
The address of the current location. The value of this symbol is
set by the Open Location and Display Contents
( |
|
FPn |
Floating point register n, where n can range from 0 to 31 (decimal). |
|
FPCR |
The floating point control register. |
|
G |
|
|
H |
|
|
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
( 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 IA-64, 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 IA-64, floating-point registers are always available to DELTA.
|
|
Alpha |
IA-64 |
|---|---|---|
|
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. Registers Supported on x86-64
x86-64 supports various named registers which can be accessed via %register-name. The quadword integer registers and a few other registers can be accessed with the older syntax.
Quadword
R0, R1, R2, R3, R4, R5, R6, R7 R8, R9, R10, R11, R12, R13, R14, R15
RAX, RBX, RCX, RDX, RSI, RDI, RBP, RSP, R8, R9, R10, R11, R12, R13, R14, R15
%RAX, %RBX, %RCX, %RDX, %RSI, %RDI, %RBP, %RSP, %R8, %R9, %R10, %R11, %R12, %R13, %R14, %R15
Note
Quadword register can be access via older syntax of Rregister-number or newer %REGISTER-NAME. For example, R0 and %RAX access the same register.
Longword Integer registers
%EAX, %EBX, %ECX, %EDX, %ESI, %EDI, %EBP, %ESP, %R8D, %R9D, %R10D, %R11D, %R12D, %R13D, %R14D, %R15D
Word
%AX, %BX, %CX, %DX, %SI, %DI, %BP, %SP, %R8W, %R9W, %R10W, %R11W, %R12W, %R13W, %R14W, %R15W
Byte
%AL, %BL, %CL, %DL, %SIL, %DIL, %BPL, %SPL, %R8B, %R9B, %R10B, %R11B, %R12B, %R13B, %R14B, %R15B
High Byte
%AH, %BH, %CH %DH
R0/FFFFFFFF.FFFFFFFFRAX/FFFFFFFF.FFFFFFFF %RAX/FFFFFFFF.FFFFFFFF
%RAX/FFFFFFFF.FFFFFFFF 4444444433332211 %RAX/44444444.33332211 %AL/11 55 %RAX/44444444.33332255 %AH/22 66 %RAX/44444444.33336655 %AX/6655 7777 %RAX/44444444.33337777 %EAX/33337777 88888888 %RAX/00000000.88888888 %RAX/00000000.88888888 FFFFFFFF.FFFFFFFF %RAX/FFFFFFFF.FFFFFFFF
Legacy access to x86-64 register set by name or number
(quadword only).
The "%" prefix to access the complete x86 register set.
Note
On x86-64, a deposit into any longword register always clears the upper longword.
Instruction Pointer (Program Counter) registers
- Quadword: %RIP (Register can also be accessed with the older PC command)
- Longword: %EIP
- Word: %IP
Flags registers
- Quadword: %RFLAGS (Register can also be accessed with the older PS command)
- Longword: %EFLAGS
- Word: %FLAGS
Control registers (quadword)
%CR0 - %CR15
Floating Point registers (octoword/128-bit)
%ST0 - %ST8
AVX register set (VSI OpenVMS x86-64 V9.2-3 or higher)
XMM registers (octoword/128-bit): %XMM0 - % XMM15
High XMM registers (if implemented) (octoword/128-bit): %XMM16 - %XMM31
YMM registers (if implemented) (256-bit): %YMM0 - %YMM15
High YMM registers (if implemented) (256-bit): %YMM16 - %YMM31
ZMM registers (if implemented) (512-bit): %ZMM0 - %ZMM15
High ZMM registers (if implemented) (512-bit): %ZMM16 - %ZMM31
DELTA will display the "Eh?" error message if an attempt is made to
access a non-implemented AVX registers. See Intel Processor documentation for
information on which processors support the optional AVX registers. DELTA will display
which optional AVX register are accessible:
VSI VMS X86 DELTA Debugger YMM0-15: Present, ZMM0-15: Present, X/Y/ZMM16-31: Present
Floating Point and AVX registers are normally accessed only in user mode code. These registers cannot be used in kernel mode code.
2.4. 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.
G4A32+24DELTA and XDELTA evaluate expressions from left to right. No operator takes precedence over any other.
|
Operator |
Action |
|---|---|
|
+ or SPACE |
Addition |
|
- |
Subtraction when used as a binary operator, or negation when used as a unary operator |
|
|
Multiplication |
|
% |
Division |
|
@ |
Arithmetic shift |
n@j
Note
Do not enter unnecessary spaces, as DELTA/XDELTA treats the space as an additional operator.
Chapter 3. Debugging Programs
Referencing addresses
Referencing registers, the PSL or PS, and the stack
Interpreting the error message
Debugging kernel mode code under certain conditions
Debugging an installed, protected, shareable image
Using XDELTA on multiprocessor computers
Debugging code when single-stepping fails (Alpha only)
Debugging code that does not match the compiler listings (IA-64 and Alpha only)
For examples of DELTA debugging sessions on various OpenVMS platforms, see Appendix A, "Sample DELTA Debug Session on IA-64" for IA-64 and Appendix B, "Sample DELTA Debug Session on Alpha" for Alpha.
3.1. Referencing Addresses
When using DELTA or XDELTA to debug programs, you move through the code by referring to addresses. To help you identify address locations within your program, use a list file and a map file. The list file (.LIS) lists each instruction and its offset value from the base address of the program section. The full map file (.MAP) lists the base addresses for each section of your program.
Once you have the base addresses of the program sections, locate the instruction in the list
file where you want to start the debugging work. Add the offset from the list program to the base
address from the map file. Remember that all calculations of address locations are done in
hexadecimal. You can use DELTA/XDELTA to do the calculations for you
with the = command.
To make address referencing easier, you can use offsets to a base address. Then you do not have to calculate all address locations. First, place the base address into a base register. Then move to a location using the offset to the base address stored in the register.
Whenever DELTA/XDELTA displays an address, it will display a relative address if the offset
falls within the permitted range (see the ;X command in Chapter 4, "DELTA/XDELTA Commands").
3.1.1. Referencing Addresses
HELLO.C). You can
also use the same commands in an XDELTA debug
session.#include <stdio.h>
main()
{
printf("Hello world\n");
}Use the
/LISTand/MACHINE_CODEqualifiers to compile the program and generate the list file containing the Alpha machine instructions.To generate the list file for the previous example, use the following command:$ cc/list/machine_code hello
The compiler will generate the following Alpha code in the machine code portion of the listing file:.PSECT $CODE, OCTA, PIC, CON, REL, LCL, SHR,- EXE, NORD, NOWRT 0000 main:: ; 000335 0000 LDA SP, -32(SP) ; SP, -32(SP) 0004 LDA R16, 48(R27) ; R16, 48(R27) ; 000337 0008 STQ R27, (SP) ; R27, (SP) ; 000335 000C MOV 1, R25 ; 1, R25 ; 000337 0010 STQ R26, 8(SP) ; R26, 8(SP) ; 000335 0014 STQ FP, 16(SP) ; FP, 16(SP) 0018 LDQ R26, 32(R27) ; R26, 32(R27) ; 000337 001C MOV SP, FP ; SP, FP ; 000335 0020 LDQ R27, 40(R27) ; R27, 40(R27) ; 000337 0024 JSR R26, DECC$GPRINTF ; R26, R26 0028 MOV FP, SP ; FP, SP ; 000338 002C LDQ R28, 8(FP) ; R28, 8(FP) 0030 LDQ FP, 16(FP) ; FP, 16(FP) 0034 MOV 1, R0 ; 1, R0 0038 LDA SP, 32(SP) ; SP, 32(SP) 003C RET R28 ; R28Notice the statement numbers on the far right of some of the lines. These numbers correspond to the source line statement numbers from the listing file as shown next:335 main() 336 { 337 printf("Hello world\n"); 338 }Use the
/MAPqualifier with the link command to generate the full map file (.MAP file). To produce a debuggable image, make sure that either/DEBUGor/TRACEBACK(the default) is also specified with the link command.To generate the map file for the example program, use the following command:$ LINK/MAP/FULL HELLO
See the Program Section Synopsis of the map file. Locate the code section that you want to debug and its base address.
For the example program, the map file is HELLO.MAP. A portion of the Program Section Synopsis is shown below. The $CODE section of the program has a base address of 20000.+--------------------------+ ! Program Section Synopsis ! +--------------------------+ Psect Name Module Name Base End Length ---------- ----------- ---- --- ------ $LINKAGE 00010000 0001007F 00000080 ( 128.) HELLO 00010000 0001007F 00000080 ( 128.) $CODE 00020000 000200BB 000000BC ( 188.) HELLO 00020000 000200BB 000000BC ( 188.)See the list file for the location where you want to start debugging. First find the source line statement number. Next find that statement number in the machine code listing portion of the list file. This is the specific instruction where you want to start debugging.
For the example program, source statement 337 is the following:printf("Hello world\n");Search the machine code listing for statement 337. The first occurrence is the instruction at offset 4 from the start of
main::and the base of the $CODE PSECT.- Enable DELTA using the following commands:
$ DEFINE LIB$DEBUG SYS$LIBRARY:DELTA $ RUN/DEBUG HELLO
If you want to store the base address in a base register, use the
;Xcommand to load the base register.For the example program, use the following DELTA/XDELTA command to store the base address of 20000 in base register 0.20000,0;X
Now you can move to specific address locations.
For example, if you want to place a breakpoint at offset 4, you would calculate the address as 20000 (base address) plus 4 (offset), or 20004, and specify the;Bcommand as follows:20004;B
Alternatively, if you stored the base address in the base register, you could use the address expressionX0+4(orX0 4, where the + sign is implied) to set the breakpoint as follows:X0+4;B
Note the address of the instruction you want to locate in the .LIS file.
For example, DELTA/XDELTA displays the following instruction at address 20020:20020! LDQ R27,#X0028(R27)
The following steps allow you to find this instruction in the .LIS file.
See the .MAP file, and identify the psect and module where the address of the instruction is located. Check the base address value and the end address value of each psect and module. When the instruction address is between the base and end address values, record the psect and module names.
In the example, the instruction address is located in the HELLO module ($CODE PSECT). The address, 20020, is between the base address 20000 and the end address 200BB.
Subtract the base address from the instruction address. Remember that all calculations are in hexadecimal and that you can use the DELTA/XDELTA
=command to do the calculations. The result is the offset.For example, subtract the base address of 20000 from the instruction address 20020. The offset is 20.
See the .LIS file. Look up the module and then find the correct psect. Look for the offset value you calculated in the previous step.
In the example, there are two psects and one module but only one $CODE PSECT. Look up the instruction at offset 20, and you will find the following in the .LIS file:0020 LDQ R27, 40(R27) ; R27, 40(R27) ; 000337
3.2. Referencing Registers
When using DELTA or XDELTA to debug programs, you can view the contents of registers. The following sections describe the types of registers that are referenced by each OpenVMS platform.
3.2.1. Referencing Registers (IA-64 Only)
On IA-64, you can reference the following kinds of registers: integer, floating, application, branch, control, special purpose, and software equivalents of special OpenVMS symbolic locations.
|
Register |
Symbol |
|---|---|
|
General |
R0 through R127 |
|
Floating |
FP0 through FP127 |
|
Branch |
BR0 through BR7 |
|
Predicate |
P0 through P63 |
|
Application |
AR16 (RSC), AR17 (BSP), AR18 (BSPSTORE), AR19 (RNAT), AR25 (CSD), AR26 (SSD), AR32 (CCV), AR36 (UNAT), AR64 (PFS), AR65 (LC), AR66 (EC) |
|
Control |
CR0 (DCR), CR1 (ITM), CR2 (IVA), CR8 (PTA), CR16 (IPSR), CR17 (ISR), CR19 (IIP), CR20 (IFA), CR21 (ITIR), CR22 (IIPA), CR23 (IFS), CR24 (IIM), CR25 (IHA),CR65 (IVR) |
In addition, there is a program counter (PC) register, which is obtained from the hardware
IP register and the ri field of the PSR register.
3.2.2. Referencing Registers (Alpha Only)
/, LINEFEED, and ESC. The symbols
for identifying these registers follow: Integer registers are referenced by the symbol R and a decimal number from 0 to 31. For example, register 110 is R110 and register 1010 is R1010.
PC is referenced symbolically by PC.
PS is referenced symbolically by PS.
FP is referenced by R29.
SP is referenced by R30.
Floating point registers are referenced by FP and a decimal number from 0 to 31. For example, floating point register 110 is FP110 and floating point register 1010 is FP1010.
FPCR is treated like any other floating point register except, to explicitly open it, you specify FPCR/.
Internal processor registers (IPRs) are accessed symbolically, for example, P(ASTEN). For IPR names, see the Alpha Architecture Reference Manual.
Floating point registers can be accessed from DELTA and from XDELTA but only if floating point arithmetic is enabled in the current process.
DELTA runs in the context of a process. 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.
When the system enters XDELTA, some process is the current process, and that current process may not be obvious. If that process happens to have floating point enabled at the time (because a floating point instruction had executed and the image containing the floating point instruction was 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 if it needs to provide access to floating point registers.
3.3. Interpreting the Error Message
Eh?
error message. This is the only error message generated by DELTA and XDELTA. It is displayed
under the following circumstances:You entered characters that DELTA/XDELTA does not recognize
You entered a command incorrectly
You exceeded the limits of the command (for example, trying to set another breakpoint when all breakpoints are used)
- You attempted to display a particular memory address and one or more of the following is true:
Location is not a valid memory address
You have no privilege to read the address
The process to which the read applies does not exist (DELTA only)
- You attempted to change a particular memory address (including setting a breakpoint) and one or more of the following is true:
The location is not a valid memory address
You have no privilege to write to the address
The process to which the write applies does not exist (DELTA only)
On IA-64, the error message is also displayed if you are unable to step over a subroutine call due to no write access to the address of the next instruction.
On Alpha, the error message is also displayed if you are unable to single-step or proceed due to no write access to the address of the next instruction.
3.4. Debugging Kernel Mode Code Under Certain Conditions
Some programs exist which, while running in process space, change mode to kernel and raise IPL. Typically, this code is debugged with both DELTA and XDELTA. DELTA is used to debug the kernel mode code at IPL 0. XDELTA is used to debug the code at elevated IPL. (DELTA does not work at elevated IPL.)
Before you can debug such code with XDELTA, you must complete some setup work.
3.4.1. Setup Required (IA-64 and Alpha Only)
Ensure that page faults do not occur at elevated IPL by locking into memory (or the working set) the code that runs at elevated IPL.
Make the code writable. (By default, code pages are read only.) To do this, modify the code psect attributes in the link options file or set the affected code pages to writable with $SETPRT.
Make code pages copy-on-reference (CRF). You can do this when you make the code writable. If you modify the link options file, set the code psect attributes to be WRT, NOSHR. If you use $SETPRT, it automatically makes the pages CRF.
3.4.2. Accessing XDELTA
After you set up the code for debugging, you are ready to access XDELTA. The most convenient method is to invoke INI$BRK from the code at elevated IPL. This causes a trap into XDELTA. You can then step out of the INI$BRK routine into the code to be debugged.
3.5. Debugging an Installed, Protected, Shareable Image
Some shareable images, such as user-written system services, must be linked and installed in a way that precludes debugging with DELTA unless you take further steps. Those steps are described in this section.
INSTALL> myimage.exe /share/protect/open/header
Other qualifiers can also be used.
When installed in this way, the shareable image code is read-only. However, to debug a user-written system service with DELTA, to single-step and to set breakpoints, the code must either be writable or DELTA must be able to change the code page protection to make it writable. Neither is possible when the code resides in a read-only global section.
PSECT=$CODE$,NOSHR,WRT
/WRITE qualifier and
without the /RESIDENT qualifier, as follows:
INSTALL> myimage.exe /share/protect/open/header/write
After you have installed the image in this way, you can use DELTA to set breakpoints in the shareable image code and single-step through it.
3.6. Using XDELTA on Multiprocessor Computers
On multiprocessor computers, only one processor can use XDELTA at a time. If a second processor attempts to enter XDELTA when another processor has already entered it, the second processor waits until the first processor has exited XDELTA. If the processor using XDELTA sets a breakpoint, other processors are aware of the breakpoint. Therefore, when the code with the XDELTA breakpoint is executed on another processor, that processor will enter XDELTA and stop at the specified breakpoint.
On Alpha systems, XDELTA uses its own system control block (SCB) to direct all interrupt handling to an error handling routine in XDELTA. Therefore, an error encountered by XDELTA does not affect any other processors that share the standard system SCB. On IA-64 systems, the implementation is different, but the outcome is the same: XDELTA avoids causing errors that could lead to unintended effects to other processors.
Brk 0 at FFFF8300.06802620 on CPU 1
3.7. Debugging Code When Single-Stepping Fails (Alpha Only)
S command to single-step occasionally fails and
the error message Eh? is displayed. This can happen either when you are
single-stepping through code or when you have stopped at a breakpoint. In each case, it fails
because XDELTA does not have write access to the next instruction. Directions on how to continue
debugging for both cases follow:You are single-stepping through your code and your single-step fails.
You can set other breakpoints and proceed with the
;Pcommand. If this occurs at a JSR or BSR instruction, you can first use theOcommand and then either single-step (with theScommand) or proceed (with the;Pcommand).You have stopped at a breakpoint and your attempt to single-step fails.
You can delete the breakpoint and then proceed with the
;Pcommand. If this occurs at a JSR or BSR instruction, it may be possible to first use theOcommand and then either single-step (with theScommand) or proceed (with the;Pcommand).
3.8. Debugging Code that Does Not Match the Compiler Listings (IA-64 and Alpha Only)
The compilers generate listings with mnemonics that replace some of the Alpha assembly language instructions. This makes the listings easier to read but can initially cause confusion because the code does not exactly match the code in your image. In every case, there is a 1-to-1 correlation between the line of code in your image and the line of code in your listing.
In certain situations, the linker can modify the instructions in your image so that they do not exactly match your compiler listings. On Alpha, for example, the linker can replace JSR instructions and the call setup to use a BSR instruction for better performance. On IA-64, the linker sometimes generates code and performs jumps and calls.
Chapter 4. DELTA/XDELTA Commands
Table 4.1, ''DELTA/XDELTA Command Summary (All platforms)'' provides a summary of the DELTA/XDELTA commands that are common to OpenVMS IA-64 and Alpha, and x86-64 systems.
Table 4.2, ''DELTA/XDELTA Command Summary (IA-64 and Alpha Only)'' provides a summary of the DELTA/XDELTA commands that are available only on OpenVMS IA-64 and Alpha.
Table 4.3, ''DELTA/XDELTA Command Summary (IA-64 Only)'' provides a summary of the DELTA/XDELTA commands that are available only on OpenVMS IA-64.
Table 4.4, ''DELTA/XDELTA Command Summary (x86-64 Only)'' provides a summary of the DELTA/XDELTA commands that are available only on OpenVMS x86-64.
Many commands in this chapter include an example.
Command Usage Summary
Only DELTA uses the
EXITand;Mcommands and arguments that specify a process identification.XDELTA defines some base registers that DELTA does not (see Chapter 2, "DELTA and XDELTA Symbols and Expressions").
On IA-64 and Alpha, only DELTA uses the
;Icommand.
For all OpenVMS platforms, differences are noted in command descriptions.
| Command | Description |
|---|---|
[ |
Set Display Mode |
/ |
Open Location and Display Contents in Prevailing Width Mode |
! |
Open Location and Display Contents in Instruction Mode |
| LINEFEED |
Close Current Location, Open Next |
| ESC |
Open Location and Display Previous Location |
| TAB |
Open Location and Display Indirect Location |
" |
Open Location and Display Contents in ASCII Mode |
| RETURN |
Close Current Location |
;B |
Breakpoint |
;P |
Proceed from Breakpoint |
;G |
Go |
S |
Step Instruction |
O |
Step Instruction over Subroutine |
;D 'string' |
Deposit ASCII String |
;E |
Execute Command String |
;X |
Load Base Register |
= |
Display Value of Expression |
|
|
Set All Processes Writable; also, set selected registers of other processes writable (available only on DELTA) |
;L |
Lists Names and Locations of Loaded Executive Images |
EXIT |
Exit from DELTA debugging session |
| Ctrl/J | Display next location |
| Command | Description |
|---|---|
;D |
Dumps a region of memory |
;Q |
Validate queue |
;C |
Force system to bug check and crash |
;W |
Locate and display the executive image that contains the specified address |
;I |
Locate and display information about the current main image that contains the specified address; also display information about all shareable images activated by the current main image (available only on DELTA) |
;H |
Display on video terminal or at hard copy terminal |
\string\ |
Display the ASCII text string enclosed in backslashes |
| Command | Description |
|---|---|
;T |
Display the address of the interrupt stack frame. |
| Command | Description |
|---|---|
% | If used as the first character, it gives access the entire x86-64 general register set. Otherwise, it is the MOD operator. |
[ (left angle bracket) – Set Display Mode
[ (left angle bracket) — Sets the width mode of displays produced by DELTA/XDELTA commands.
Synopsis
[ mode Argument
|
Mode |
Meaning |
|---|---|
|
B |
Byte mode. Subsequent open and display location commands display the contents of one byte of memory. |
|
L |
Longword mode. Subsequent open and display location commands display the contents of a longword of memory. This is the default mode. |
|
W |
Word mode. Subsequent open and display location commands display the contents of one word of memory. |
|
Mode |
Meaning |
|---|---|
|
A |
Address display of 32-bit/64-bit. Subsequent address displays will be 64 bits. |
|
Q |
Quadword mode. Subsequent open and display location commands display the contents of a quadword of memory. |
Description
The Set Display Mode command changes the prevailing display width to byte, word, longword, or quadword. The default display width is longword on Alpha and quadword on IA-64 and x86-64. The display mode remains in effect until you enter another Set Display Mode command.
/ (forward slash) – Open Location and Display Contents in
Prevailing Width Mode
/ (forward slash) — Opens a location and displays its contents in the prevailing display mode.
Synopsis
/ current-contents [new-exp]Arguments
If you use the pid argument, every time you use this command during
the debugging session the contents of the same process are displayed, unless you specify a
different pid.
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 SHOWPROCESS/INDEX to determine the internal PID. For more
information about using SDA commands, see your operating system's VMS System Dump Analyzer Utility Manual.
start-addr-exp/
R3/
start-addr-exp,end-addr-exp/
R3,R5/
If you specify an address expression for end-addr-exp that is less than start-addr-exp, DELTA/XDELTA displays the contents of start-addr-exp only.
pid argument and the address expression. It is displayed in the
prevailing width display mode.end-addr-exp).When you specify new-exp, terminate the command by pressing the
Return key.
If you want to deposit a new value into a location in another process (that is, you
specified a PID other than the current process), you must have already set the target process to
be writable using the ;M command.
202/ 05D053D4 204/ C05405D0
FFFFFFFFF at address 202, the overflow
value would overwrite the value stored at address location 204, as
follows:202/ 05D053D4 FFFFFFFFF Return
204/ C054FFFFDescription
The Open Location and Display Contents command opens the location or range of locations at start-addr-exp and displays current-contents, the contents of that location, in hexadecimal format. You can place a new value in the location by specifying an expression. A new value overwrites the last value displayed.
402,4F0/
Writes any new-exp specified
Closes the location opened by the
/commandAdds the number of bytes (defined by the prevailing display width mode) to the address just opened with the
/commandChanges 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.
00010010:402/
00010010:R5/
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.
! (exclamation mark) – Open Location and Display Contents
in Instruction Mode
! (exclamation mark) — Displays an instruction and its operands.
Synopsis
! Arguments
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 VMS System Dump Analyzer Utility Manual.
start-addr-exp!
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.
Examples
The following examples illustrate the command on each OpenVMS platform.
G0BF5D60! add r33 = 0008, r33 ;;80BF5D62! nop.i 000000 ;;
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]
30000! LDA SP,#XFFE0(SP)00030004! BIS R31,R31,R18
The instruction at address 30000 is displayed using the | |
After typing a LINEFEED command, DELTA/XDELTA displays the next instruction location and the instruction at that address. |
" (double quote) – Open Location and Display Contents in
ASCII
" (double quote) — Displays the contents of a location as an ASCII string.
Synopsis
" Arguments
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 VMS System Dump Analyzer Utility Manual.
start-add-exp"
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/415A235FC2" ZA
Linefeed
235FC4/PP
The current display mode is word (displays one word in hexadecimal). | |
The | |
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
’ (single quote) — Deposits the ASCII string at the current address.
Synopsis
’ string ’ Arguments
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
= (equal sign) — Evaluates an expression and displays its value.
Synopsis
= Argument
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, ''Symbols Supplied by DELTA and XDELTA'' for a description of DELTA/XDELTA expressions.
Note
Because DELTA and XDELTA treat the space as an addition operator, do not enter an unnecessary space.
\string\ – Immediate mode text display
command (IA-64 and Alpha Only)
string\\string\ — Displays the ASCII text string enclosed in backslashes.
Synopsis
\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.
Ctrl/J – Display Next Location
Ctrl/J — Display next location.
Synopsis
Ctrl/J key Description
The Ctrl/J can be used to display the next location.
The next location will be displayed with the current register format:
If you examine R0, then Ctrl/J will display R1 and its contents.
If you examine RAX, then Ctrl/J will display RBX and its contents.
If you examine %RAX, then Ctrl/J will display %RBX and its contents.
%EAX, %AX and %AL can be examined and their contents will be displayed in the correct size.
You can also use Ctrl/J to move forward in instruction decode mode.
Example
VSI VMS X86 XDELTA Debugger [SYSBOOT], XF29, Mar 27 2019 06:44:56 Brk 0 at 00000000.004AEF7D 00000000.004AEF7D!movq $00000042,%rax %RAX/00000000.00000000 <^J> %RBX/00000000.00000002 <^J> %RCX/00000000.004225F0 <^J> %RDX/00000000.DFF14918 <^J> %RSI/00000000.00000000 <^J> %RDI/00000000.00000048 <^J> %RBP/00000000.7FFF6E10 <^J> %RSP/00000000.7FFF6B48 <^J> %R8/00000000.00000000 <^J> %R9/00000000.00462D10 <^J> %R10/00000000.00000000 <^J> %R11/00000000.FFFF03FC <^J> %R12/00000000.00422658 <^J> %R13/00000000.00DAA520 <^J> %R14/00000000.007CFC00 <^J> %R15/00000000.005189D0 <^J>
ESC (Escape key) – Open Location and Display
Previous Location
ESC (Escape key) – Open Location and Display Previous Location — Opens the previous location and displays its contents.
Synopsis
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 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 key boards) generates different characters and cannot be used for the ESC command. You must use Ctrl/3.
On x86-64, the ESC key can be used to display the previous location after pressing Ctrl/J. This feature is similar to capabilities in Alpha and IA-64 version of XDELTA, but the x86-64 version has been updated to display the correct register names.
Note
On x86-64, the ESC command will not work in instruction mode. x86-64
systems have variable length instruction so it is difficult to calculate the address of the
previous instruction. Alpha and IA-64 have fixed length instruction, and it is easy to find the
address of the previous instruction.
Example
R1/00000000$
ESC R0/00000001
Example
R0/FFFFFFFF.80094308 <^J> R1/FFFFFFFF.87318E00 <^J> R2/FFFFFFFF.80094000 R0/FFFFFFFF.80094308 <^J> R1/FFFFFFFF.87318E00 <ESC> R0/FFFFFFFF.80094308 RAX/FFFFFFFF.80094308 <^J> RBX/FFFFFFFF.87318E00 <ESC> RAX/FFFFFFFF.80094308 %RAX/FFFFFFFF.80094308 <^J> %RBX/FFFFFFFF.87318E00 <ESC> %RAX/FFFFFFFF.80094308 %EAX/80094308 <^J> %EBX/87318E00 <ESC> %EAX/80094308 %AX/4308 <^J> %BX/8E00 <ESC> %AX/4308 %AL/08 <^J> %BL/00 <ESC> %AL/08 FFFF8300.108B3DC2!movq %rax,(%rbx) <^J> FFFF8300.108B3DC5!movq %rdx,08(%rbx) <^J> FFFF8300.108B3DC9!btl $00,000000F0(%rbx) <^J> FFFF8300.108B3DD1!jb 00006011 <^J> FFFF8300.108B3DD7!movq 0003494A(%rip),%r10 <^J> FFFF8300.108B3DDE!leaq 20(%r10),%r10 <^J> FFFF8300.108B3DE2!movzwq (%r10),%r11 <^J> FFFF8300.108B3DE6!movq 00034923(%rip),%r10 <^J> FFFF8300.108B3DED!leaq 00000708(%r10),%r10 <^J> FFFF8300.108B3DF4!movw %r11w,(%r10) <^J> FFFF8300.108B3DF8!movq 00034929(%rip),%r10 <^J> FFFF8300.108B3DFF!leaq 00000108(%r10),%r10 <^J> FFFF8300.108B3E06!movslq (%r10),%r11 <ESC> ! Not supported in instruction mode FFFF8300.108B3E06!movslq (%r10),%r11 <ESC> FFFF8300.108B3E06!movslq (%r10),%r11 <ESC>
EXIT – Exit from DELTA Debugging Session
EXIT — Terminates the DELTA debugging session. Use with DELTA only.
Synopsis
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
LINEFEED (Linefeed key or
Ctrl/J) — Closes the currently open location and opens the next location, displaying its
contents.
Synopsis
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 key boards) 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.
On x86-64, you can also use Ctrl/J to move forward in instruction decode mode, but ESC cannot be used to look at the previous instruction due to the complexity of the variable length instruction set on x86-64. This restriction is similar to the VAX restriction.
Examples
The following examples illustrate the command on each OpenVMS platform.
G0BF5D60! add r33 = 0008, r33 ;;80BF5D62! nop.i 000000 ;;
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]
30000! LDA SP,#XFFE0(SP)00030004! BIS R31,R31,R18
00030008! STQ R27,(SP) 0003000C! BIS R31,R31,R19 00030010! STQ R26,#X0008(SP) 00030014! BIS R31,#X04,R25
RETURN (Return or Enter
key) – Close Current Location
RETURN (Return or Enter
key) — Closes a location that has been opened by one of the open location and display
contents commands.
Synopsis
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.
;X;E;G;P;B;M'string';LEXIT(DELTA only)
;Q;C;D;H;I;T(IA-64 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 ’ (single quote) – Deposit ASCII
String
(’).
TAB (Tab key) – Open Location and Display
Indirect Location
TAB (Tab key) — Opens the location addressed by the contents of the current location and displays its
contents.
Synopsis
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.
Examples
The following examples illustrate the command on each OpenVMS platform.
10000/0008308900010004/00000000
00010008/00030000
00030000/23DEFFE0
;B – Breakpoint
;B — Shows, sets, and clears breakpoints.
Synopsis
;B Arguments
The address where you want the breakpoint.
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?.
For both XDELTA and DELTA, the range is from 1 to 8.
;E – Execute Command String 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
;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, the section called “Setting Complex Breakpoints”)
Setting Simple Breakpoints
addr-exp;B ReturnDELTA/XDELTA sets a breakpoint at the specified location and assigns it the first available breakpoint number.
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 IA-64, Alpha, and x86-64, the format of the display is shown in the following example:
Brk n at address [on CPUn] [new mode =] [new IPL =] address!decoded-instruction
On IA-64 and Alpha systems, if the interrupt priority level (IPL) has changed, the new IPL is printed (XDELTA only). Also on IA-64 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 CPUID of the processor where the break was taken is also displayed.
On IA-64, Alpha, and x86-64, 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.
408,4;B ReturnDELTA/XDELTA sets a breakpoint at the specified location and assigns it the specified breakpoint number.
Clearing Breakpoints
0,4;B ReturnSetting Complex Breakpoints
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
(’).
addr-exp,n,display-addr-exp,cmd-string-addr;B
Example
;B 1 00000690 2 000006990,2;B
;B 1 00000690
;P
Two breakpoints have already been set and are displayed. Using | |
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 |
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.)
;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)
;C – Force System to Bugcheck and Crash (IA-64 and Alpha
Only)
;C — Force the system to bugcheck and crash.
Synopsis
;C Description
;C command forces the system to bugcheck and crash. You can do this
from wherever you are in your debugging session. Although this command is for use primarily with
XDELTA, you can also use it with DELTA, but only in kernel mode. When you issue this command,
the following message is generated:
BUG$_DEBUGCRASH, Debugger forced system crash
;D – Dump
;D — Dumps a region of memory.
Synopsis
;D Arguments
The starting address of the dump.
The length of bytes to dump.
Description
On IA-64 and Alpha systems, the ;D command dumps a region of memory. The
display is in a format similar to the DCL DUMP command.
Example
G,200;DDump of 80000000 for 00000200 bytes
00840008 80000200 0000241F 00E8401D .@...$.......... : 80000000
00840008 80000200 00002400 0004401D .@...$.......... : 80000010 00840008 80000200 00000001 0000001D ................ : 80000020 00000000 00000000 00000000 00000000 ................ : 80000030 00040000 00203008 00202400 0260100B ..`..$ ..0 ..... : 80000040 90000A00 40038004 10700001 00000001 ......p....@.... : 80000050 00800070 00000200 00001418 04200810 .. .........p... : 80000060 00000000 00000000 00000000 00000000 ................ : 80000070 00000000 00000000 00000000 00000000 ................ : 80000080 00000000 00000000 00000000 00000000 ................ : 80000090 00000000 00000000 00000000 00000000 ................ : 800000A0 00000000 00000000 00000000 00000000 ................ : 800000B0 00000000 00000000 00000000 00000000 ................ : 800000C0 00000000 00000000 00000000 00000000 ................ : 800000D0 00000000 00000000 00000000 00000000 ................ : 800000E0 00000000 00000000 00000000 00000000 ................ : 800000F0 00040000 00040000 00300580 02090001 ......0......... : 80000100 00840008 80000200 00000001 0000001D ................ : 80000110 00840008 80000200 00000001 0000001D ................ : 80000120 00840008 80000200 00002400 0004401D .@...$.......... : 80000130 00840008 80000200 0000241C 0128401D .@
()..$......... : 8000014084000804 40006200 02000580 060D0800 .........b.@.... : 80000150 20000000 00000200 00002400 0000C81D .....$......... : 80000160 50000178 00000200 00000001 0000001D ............x..P : 80000170 07000A00 00005501 08002100 44000802 ...D.!...U...... : 80000180 00840008 80000200 00000001 0000001D ................ : 80000190 00840008 80000200 00002400 0004401D .@...$.......... : 800001A0 00840008 80000200 00002400 0004401D .@...$.......... : 800001B0 00840008 80000200 00002400 0004401D .@...$.......... : 800001C0 00840008 80000200 00002400 0004401D .@...$.......... : 800001D0 00840008 80000200 00002400 0004401D .@...$.......... : 800001E0 00840008 80000200 00002400 0004401D .@...$.......... : 800001F0 FFFFFFFF 8
;E – Execute Command String
;E — Executes a string of DELTA/XDELTA commands stored in memory.
Synopsis
;E Arguments
The address of the string of DELTA/XDELTA commands to execute.
Description
The Execute Command String command executes a string of DELTA/XDELTA commands. Load the
ASCII text command string to a specific location in memory using the Deposit ASCII String
command (') or code the string in your program into an identifiable
location.
If you want DELTA/XDELTA to proceed with program execution after it executes the string of
commands, end the command string with the ;P command. If you want
DELTA/XDELTA to wait for you to enter a command after it executes the string of commands, end
the command string with a null byte (a byte containing 0).
XDELTA, but not DELTA, provides two command strings in memory.
On Alpha, the addresses of these command strings are stored in base registers X14 and X15. The string addressed by X14 displays the physical page number (PFN) database for the PFN in X0. The string addressed by X15 copies the PFN in R0 to base register X0. It then displays the PFN database for that PFN.
Specified PFN
PFN state and type
PFN reference count
PFN backward link or working-set-list index
PFN forward link or share count
Page table entry (PTE) address that points to the PFN
PFN backing-store address
On Alpha, the virtual page number in process swap image, the collection of blocks containing the page as pointed to by the PFN database
Example
7FFE1600,0;X7FFE1600
X0;E
R0/00000001
R1/00000000 R2/00000000
The address (7FFE1600) where an ASCII string is stored is placed into base register 0
using | |
DELTA/XDELTA displays the value in X0. | |
The command string stored at address 7FFE1600, which is to examine the contents of R0,
R1, and R2 (R0/ Linefeed
Linefeed), is executed with | |
DELTA/XDELTA executes the commands and displays the contents of R0, R1, and R2. |
;G – Go
;G — Continues program execution.
Synopsis
;G Arguments
The address at which to continue program execution.
Description
The Go command places the address you specified in address-expression into the PC and continues execution of the program at that address. It is useful when you want to ignore specific lines of code or return to a previous program location to repeat execution.
Example
6A2;G
Program execution is started at address 6A2.
;H – Video Terminal Display Command (IA-64 and Alpha
Only)
;H — Specifies the display mode, either hard copy terminal mode or DEC-CRT.
Synopsis
;H Description
The ;H command enables you to choose the display mode of DELTA/XDELTA
output. You can display output either in hard copy terminal mode or DEC-CRT mode. The default
display is DEC-CRT mode. You can toggle back and forth from one display mode to the other by
repeating the ;H command.
;I – List Current Main Image and Its Shareable Images
(IA-64 and Alpha Only)
;I — Lists information about the current main image and all shareable images that were
activated, including those that were installed /RESIDENT.
Synopsis
;I Description
The ;I command peruses the image control block (IMCB) list and displays
information about the current main image and all shareable images that were activated, including
those that were installed /RESIDENT. The ;I command
differs from the ;L command which displays information about the loadable
image database.
The display of the ;I command is similar to the ;L
command display. It shows the image name, the starting and ending addresses, the symbol vector
address, and some flags. The command is useful for debugging shareable images. For example, the
display enables you to determine where LIBRTL is mapped.
The field flags are M, S, and P. The flag M indicates the main image; S or P indicates images that are installed as shareable or protected, respectively.
Unlike the ;L command, which only works from kernel mode or when you
have CMEXEC or CMKRNL privileges, the ;I command works from any mode.
However, to modify the IMCB database, you must be in executive or kernel mode.
For resident main and shareable images, the ;I command also includes an
entry for each resident code section and each compressed data section, which shows the base and
end address for each section.
The ;I command is implemented only for DELTA.
Example
$ define lib$debug delta $ run/debug hello OpenVMS Alpha DELTA Version 1.5 Brk 0 at 00020040 00020040! LDA SP,#XFFD0(SP) ;i Image Name Base End Symbol-Vector Flags HELLO 00010000 000301FF M DECC$SHR 00032000 001233FF 00106B90 S DPML$SHR 0012C000 001AC5FF 0019DED0 S LIBRTL 001AE000 0025E7FF 00240790 S Resident Code Sections: 8015A000 801BBA00 LIBOTS 00124000 0012A1FF 00128000 S Resident Code Sections: 801BC000 801C2C00 Compressed Data Sections: 00124000 00124A00 00126000 00126800 00128000 00128600 0012A000 0012A200 SYS$PUBLIC_VECTORS 80401C98 80403028 80401C98 DELTA 00260000 002943FF 00260000 SYS$BASE_IMAGE 8040C5B0 804163E0 8040C5B0
;L – List Names and Locations of Loaded Executive
Images
;L — Lists the names and virtual addresses of all loaded executive images.
Synopsis
;L Argument
On IA-64 and Alpha, specifies a single executive image.
Description
Use the ;L command when you are debugging code that resides in system
space. Although you use this command mostly with XDELTA, you can use it with DELTA if your
process has change-mode-to-executive (CMEXEC) privilege and you are running a program in
executive mode.
This command lists the names and locations of the loaded modules of the executive. A
loading mechanism maps a number of images of the executive into system space. The
;L command lists the currently loaded images with their starting and ending
virtual addresses. If you enter ;L before all the executive images are loaded
(for example, at an XDELTA initial breakpoint), only those images that have been loaded will be
displayed.
Using nn;L will display an image identified by the
sequence number. This is useful if the full list scrolls off the screen.
On Alpha, this command displays additional information and provides a second use, based on the additional information. For each loaded executive image that is sliced into discontiguous image sections, the display shows the sequence number for the executive image and the base and ending addresses of each image section. A second use of this command is to display the base and ending addresses of a single image if you specify its sequence number.
On x86-64, 1;L will display a 1-line version of
;L.
Examples
The following examples illustrate the command on each platform.
24;L Seq# LDRISD Image Name Base End Link End 0024 83881B80 PROCESS_MANAGEMENT 0 83881C70 Read Write 83203800 83203808 00010000 00010008 1 83881CB8 Read Execute 805AF300 806E4D70 00014000 00149A70 2 83881D00 Read 83203A00 83230C78 0014C000 00179278 3 83881D48 Read Write 83230E00 8323C120 0017C000 00187320 4 83881D90 Read Write 8323C200 8323C214 00188000 00188014 7 83881E68 Read Write 8323C400 8323C414 00194000 00194014 8 83881EB0 Read Write 8323C600 8323C604 00198000 00198004 9 83881EF8 Read Write 8323C800 83240660 0019C000 0019FE60 0;L Seq# LDRISD Image Name Base End Link End 0000 83868580 SYS$PUBLIC_VECTORS 0 83868670 Read Execute 80000000 80000070 00010000 00010070 1 838686B8 Read 83000000 830000B0 00014000 000140B0 2 83868700 Read Write 83000200 83000218 00018000 00018018 3 83868748 Read 83000400 83008788 0001C000 00024388 Symbol Vector 83000400 32;L Seq# LDRISD Image Name Base End Link End 0032 83885500 RMS 0 838855E0 Read Write 832B5800 832B5F40 00010000 00010740 1 83885628 Read Execute 8014E900 8014FAE0 00014000 000151E0 2 83885670 Read Execute 8098D100 80B9C8A0 00018000 002277A0 3 838856B8 Read 832B6000 832EC400 00228000 0025E400 4 83885700 Read Write 832EC400 832EFAE8 00260000 002636E8 5 83885748 Read Write 832EFC00 832EFC14 00264000 00264014 6 83885790 Read Write 832EFE00 832EFE50 00268000 00268050 9 83885868 Read Write 832F0000 832F0014 00274000 00274014 A 838858B0 Read Write 832F0200 832F0204 00278000 00278004 B 838858F8 Read Write 832F0400 832F3DC0 0027C000 0027F9C0
;L
Seq# Image Name Base End
0012 EXEC_INIT.EXE 8080C000 80828000
0010 SYS$CPU_ROUTINES_0101.EXE
Nonpaged read only 80038000 8003A200
Nonpaged read/write 80420200 80420A00
Initialization 80808000 80808400
000E ERRORLOG.EXE
Nonpaged read only 8002E000 80036600
Nonpaged read/write 8041BE00 80420200
Initialization 80804000 80804800
000C SYSTEM_SYNCHRONIZATION.EXE
Nonpaged read only 80024000 8002C800
Nonpaged read/write 8041A000 8041BE00
Initialization 80800000 80800800
. . . .
. . . .
. . . .
0002 SYS$BASE_IMAGE
Nonpaged read only 80002000 80009400
Nonpaged read/write 80403000 80414C00
Fixup 80620000 80620600
Symbol Vector 8040B010 80414560
0000 SYS$PUBLIC_VECTORS.EXE
Nonpaged read only 80000000 80001C00
Nonpaged read/write 80400000 80403000
Fixup 8061E000 8061E200
Symbol Vector 80401BF0 80402ED0;L command to display information about one image. In this example, the
sequence number C for the SYSTEM_SYNCHRONIZATION.EXE module is specified with the
;L command. (It is not necessary to specify the leading zeros in the
command.) The resulting display shows only the SYSTEM_SYNCHRONIZATION.EXE module (whose sequence
number is 000C). The display includes the names of the image sections within the module and
their base and ending addresses.C;L
Seq# Image Name Base End
000C SYSTEM_SYNCHRONIZATION.EXE
Nonpaged read only 80024000 8002C800
Nonpaged read/write 8041A000 8041BE00
Initialization 80800000 80800800The next example is taken from an x86-64 processor system:
;L Seq# LDRISD Image Name Base End Link End 0040 FFFFFFFF.8167E200 SYS$DMDRIVER 0 FFFFFFFF.8167E338 Read Write FFFFFFFF.8011FC00 FFFFFFFF.8011FC10 00000000.00002000 00000000.00002010 1 FFFFFFFF.8167E388 Read FFFF8300.111EF400 FFFF8300.111EFC20 00000000.80000000 00000000.80000820 2 FFFFFFFF.8167E3D8 Read Execute FFFF8300.111EFD00 FFFF8300.111F1C10 00000000.80002000 00000000.80003F10 3 FFFFFFFF.8167E428 Read Fixed FFFF8300.111F3D00 FFFF8300.111F3EA0 00000000.80006000 00000000.800061A0 4 FFFFFFFF.8167E478 Read Write FFFFFFFF.8011FE00 FFFFFFFF.80120316 00000000.00004000 00000000.00004516 7 FFFFFFFF.8167E568 Read Execute FFFFFFFF.862BE800 FFFFFFFF.862BE8C0 00000000.00006000 00000000.000060C0 003E FFFFFFFF.81662EC0 SYS$TTDRIVER 0 FFFFFFFF.81662FF8 Read FFFF8300.111C4000 FFFF8300.111C4B28 00000000.80000000 00000000.80000B28 1 FFFFFFFF.81663048 Read Execute FFFF8300.111C4C00 FFFF8300.111EBB78 00000000.80002000 00000000.80028F78 2 FFFFFFFF.81663098 Read Fixed FFFF8300.111EEC00 FFFF8300.111EF318 00000000.8002C000 00000000.8002C718 3 FFFFFFFF.816630E8 Read Write FFFFFFFF.8011EE00 FFFFFFFF.8011FAF8 00000000.00002000 00000000.00002CF8 6 FFFFFFFF.816631D8 Read Execute FFFFFFFF.862BE400 FFFFFFFF.862BE750 00000000.00004000 00000000.00004350 003C FFFFFFFF.816770C0 SYS$ISA_SUPPORT 0 FFFFFFFF.816771F8 Read Write FFFFFFFF.8011E400 FFFFFFFF.8011E404 00000000.00002000 00000000.00002004 1 FFFFFFFF.81677248 Read FFFF8300.111BF900 FFFF8300.111BFD20 00000000.80000000 00000000.80000420 2 FFFFFFFF.81677298 Read Execute FFFF8300.111BFE00 FFFF8300.111C26E8 00000000.80002000 00000000.800048E8 3 FFFFFFFF.816772E8 Read Fixed FFFF8300.111C3E00 FFFF8300.111C3FD0 00000000.80006000 00000000.800061D0 4 FFFFFFFF.81677338 Read Write FFFFFFFF.8011E600 FFFFFFFF.8011ECAD 00000000.00004000 00000000.000046AD 7 FFFFFFFF.81677428 Read Execute FFFFFFFF.862BE200 FFFFFFFF.862BE290 00000000.00006000 00000000.00006090 003A FFFFFFFF.81625900 SYS$PCI_SUPPORT 0 FFFFFFFF.81625A38 Read FFFF8300.111AA400 FFFF8300.111AB040 00000000.80000000 00000000.80000C40 1 FFFFFFFF.81625A88 Read Execute FFFF8300.111AB100 FFFF8300.111BBC48 00000000.80002000 00000000.80012B48 2 FFFFFFFF.81625AD8 Read Fixed FFFF8300.111BF100 FFFF8300.111BF830 00000000.80016000 00000000.80016730 3 FFFFFFFF.81625B28 Read Write FFFFFFFF.8011CA00 FFFFFFFF.8011E3DB 00000000.00002000 00000000.000039DB 6 FFFFFFFF.81625C18 Read Execute FFFFFFFF.862BDE00 FFFFFFFF.862BE020 00000000.00004000 00000000.00004220 0038 FFFFFFFF.816243C0 VMS_EXTENSION 0 FFFFFFFF.81624500 Read FFFF8300.11077A00 FFFF8300.11077B40 00000000.80000000 00000000.80000140 1 FFFFFFFF.81624550 Read Execute FFFF8300.111A6300 FFFF8300.111A9970 00000000.80002000 00000000.80005670 2 FFFFFFFF.816245A0 Read Fixed FFFF8300.111AA300 FFFF8300.111AA370 00000000.80006000 00000000.80006070 3 FFFFFFFF.816245F0 Read Write FFFFFFFF.8011C800 FFFFFFFF.8011C810 00000000.00002000 00000000.00002010 7 FFFFFFFF.81624730 Read Execute FFFFFFFF.862BDC00 FFFFFFFF.862BDCA0 00000000.00006000 00000000.000060A0 0036 FFFFFFFF.81623D00 SYSINITX 0 FFFFFFFF.81623E40 Read Write FFFFFFFF.800FDE00 FFFFFFFF.800FDE40 00000000.00002000 00000000.00002040 1 FFFFFFFF.81623E90 Read Write FFFFFFFF.80108A00 FFFFFFFF.80108A27 00000000.00004000 00000000.00004027 2 FFFFFFFF.81623EE0 Read FFFFFFFF.862BD400 FFFFFFFF.862BD420 00000000.00006000 00000000.00006020 3 FFFFFFFF.81623F30 Read Execute FFFF8300.11141500 FFFF8300.111417C8 00000000.80000000 00000000.800002C8 4 FFFFFFFF.81623F80 Read Write Execute Fixed FFFF8300.11143500 FFFF8300.11143530 00000000.80002000 00000000.80002030 5 FFFFFFFF.81623FD0 Read Fixed FFFF8300.11145500 FFFF8300.11145538 00000000.80004000 00000000.80004038 6 FFFFFFFF.81624020 Read FFFF8300.11145600 FFFF8300.11147BE0 00000000.80006000 00000000.800085E0 7 FFFFFFFF.81624070 Read Execute FFFF8300.11147C00 FFFF8300.1119B5B0 00000000.8000A000 00000000.8005D9B0 8 FFFFFFFF.816240C0 Read Fixed FFFF8300.111A3C00 FFFF8300.111A62A8 00000000.80066000 00000000.800686A8 9 FFFFFFFF.81624110 Read Write FFFFFFFF.80108C00 FFFFFFFF.8011C47B 00000000.00008000 00000000.0001B87B A FFFFFFFF.81624160 Read Write FFFFFFFF.873FA000 FFFFFFFF.873FA0A4 00000000.0001C000 00000000.0001C0A4 B FFFFFFFF.816241B0 Read Write Execute FFFFFFFF.7FF0E000 FFFFFFFF.7FF0E3F8 00000000.8006A000 00000000.8006A3F8 C FFFFFFFF.81624200 Read Fixed FFFFFFFF.7FF10000 FFFFFFFF.7FF10050 00000000.8006C000 00000000.8006C050 D FFFFFFFF.81624250 Read Write FFFFFFFF.8011C600 FFFFFFFF.8011C60C 00000000.0001E000 00000000.0001E00C E FFFFFFFF.816242A0 Read FFFF8300.11077400 FFFF8300.11077980 00000000.8006E000 00000000.8006E580 F FFFFFFFF.816242F0 Read Execute FFFFFFFF.862BD600 FFFFFFFF.862BDA60 00000000.00020000 00000000.00020460 0034 FFFFFFFF.81623640 SYS$LOGINOUT 0 FFFFFFFF.81623780 Read Write FFFFFFFF.800FD400 FFFFFFFF.800FD420 00000000.00002000 00000000.00002020 1 FFFFFFFF.816237D0 Read Write FFFFFFFF.800FD600 FFFFFFFF.800FD62A 00000000.00004000 00000000.0000402A 2 FFFFFFFF.81623820 Read FFFF8300.11072600 FFFF8300.11074B38 00000000.80000000 00000000.80002538 3 FFFFFFFF.81623870 Read Write FFFFFFFF.800FD800 FFFFFFFF.800FD81C 00000000.00006000 00000000.0000601C 4 FFFFFFFF.816238C0 Read Write FFFFFFFF.800FDA00 FFFFFFFF.800FDA18 00000000.00008000 00000000.00008018 5 FFFFFFFF.81623910 Read FFFF8300.11074C00 FFFF8300.11077128 00000000.80004000 00000000.80006528 6 FFFFFFFF.81623960 Read FFFFFFFF.862BA400 FFFFFFFF.862BC860 00000000.0000A000 00000000.0000C460 7 FFFFFFFF.816239B0 Read Execute FFFF8300.11078000 FFFF8300.1112CFA9 00000000.80008000 00000000.800BCFA9 8 FFFFFFFF.81623A00 Read Fixed FFFF8300.1113E000 FFFF8300.11141428 00000000.800CE000 00000000.800D1428 9 FFFFFFFF.81623A50 Read Write FFFFFFFF.800FE000 FFFFFFFF.80108978 00000000.0000E000 00000000.00018978 A FFFFFFFF.81623AA0 Read Write FFFFFFFF.873F8000 FFFFFFFF.873F80A4 00000000.0001A000 00000000.0001A0A4 B FFFFFFFF.81623AF0 Read Write Execute FFFFFFFF.7FF2C000 FFFFFFFF.7FF2C3F8 00000000.800D2000 00000000.800D23F8 C FFFFFFFF.81623B40 Read Fixed FFFFFFFF.7FF2E000 FFFFFFFF.7FF2E050 00000000.800D4000 00000000.800D4050 D FFFFFFFF.81623B90 Read Write FFFFFFFF.800FDC00 FFFFFFFF.800FDC40 00000000.0001C000 00000000.0001C040 E FFFFFFFF.81623BE0 Read FFFF8300.11077200 FFFF8300.11077388 00000000.800D6000 00000000.800D6188 F FFFFFFFF.81623C30 Read Execute FFFFFFFF.862BCA00 FFFFFFFF.862BD340 00000000.0001E000 00000000.0001E940 0032 FFFFFFFF.816230C0 SYS$DIRECTORY 0 FFFFFFFF.81623200 Read FFFFFFFF.862B9800 FFFFFFFF.862B9AC0 00000000.00002000 00000000.000022C0 1 FFFFFFFF.81623250 Read Execute FFFF8300.10F6EB00 FFFF8300.10F6F238 00000000.80000000 00000000.80000738 2 FFFFFFFF.816232A0 Read Execute Fixed FFFF8300.10F70B00 FFFF8300.10FE22E1 00000000.80002000 00000000.800737E1 3 FFFFFFFF.816232F0 Read Fixed FFFF8300.10FECB00 FFFF8300.10FEF2A8 00000000.8007E000 00000000.800807A8 4 FFFFFFFF.81623340 Read Write FFFFFFFF.800F2000 FFFFFFFF.800F624B 00000000.00004000 00000000.0000824B 5 FFFFFFFF.81623390 Read Write FFFFFFFF.800F6400 FFFFFFFF.800FCECC 00000000.0000A000 00000000.00010ACC 6 FFFFFFFF.816233E0 Read Write FFFFFFFF.800FD000 FFFFFFFF.800FD018 00000000.00012000 00000000.00012018 7 FFFFFFFF.81623430 Read Write FFFFFFFF.800FD200 FFFFFFFF.800FD26C 00000000.00014000 00000000.0001406C 8 FFFFFFFF.81623480 Read Execute FFFF8300.10FEF300 FFFF8300.110643A8 00000000.80082000 00000000.800F70A8 9 FFFFFFFF.816234D0 Read Fixed FFFF8300.1106D300 FFFF8300.1106DF58 00000000.80100000 00000000.80100C58 A FFFFFFFF.81623520 Read FFFF8300.1106E000 FFFF8300.11072538 00000000.80102000 00000000.80106538 B FFFFFFFF.81623570 Read Execute FFFFFFFF.862B9C00 FFFFFFFF.862BA290 00000000.00016000 00000000.00016690 0030 FFFFFFFF.81622C40 SYSLDR_DYN 0 FFFFFFFF.81622D78 Read Write FFFFFFFF.800ED200 FFFFFFFF.800ED23C 00000000.00002000 00000000.0000203C 1 FFFFFFFF.81622DC8 Read FFFF8300.10F4BF00 FFFF8300.10F4DDF8 00000000.80000000 00000000.80001EF8 2 FFFFFFFF.81622E18 Read Execute FFFF8300.10F4DE00 FFFF8300.10F6B2F8 00000000.80002000 00000000.8001F4F8 3 FFFFFFFF.81622E68 Read Fixed FFFF8300.10F6DE00 FFFF8300.10F6EA98 00000000.80022000 00000000.80022C98 4 FFFFFFFF.81622EB8 Read Write FFFFFFFF.800ED400 FFFFFFFF.800F1EB9 00000000.00004000 00000000.00008AB9 8 FFFFFFFF.81622FF8 Read Execute FFFFFFFF.862B9600 FFFFFFFF.862B96B0 00000000.0000C000 00000000.0000C0B0 002E FFFFFFFF.81622800 MESSAGE_ROUTINES 0 FFFFFFFF.81622940 Read FFFF8300.10F22700 FFFF8300.10F23420 00000000.80000000 00000000.80000D20 1 FFFFFFFF.81622990 Read Execute FFFF8300.10F23500 FFFF8300.10F48A08 00000000.80002000 00000000.80027508 2 FFFFFFFF.816229E0 Read Fixed FFFF8300.10F4B500 FFFF8300.10F4BE08 00000000.8002A000 00000000.8002A908 3 FFFFFFFF.81622A30 Read Write FFFFFFFF.800EC600 FFFFFFFF.800ED200 00000000.00002000 00000000.00002C00 4 FFFFFFFF.81622A80 Read Write FFFFFFFF.873F4000 FFFFFFFF.873F4124 00000000.00004000 00000000.00004124 5 FFFFFFFF.81622AD0 Read Write Execute FFFFFFFF.7FF50000 FFFFFFFF.7FF50710 00000000.8002C000 00000000.8002C710 6 FFFFFFFF.81622B20 Read Fixed FFFFFFFF.7FF52000 FFFFFFFF.7FF52098 00000000.8002E000 00000000.8002E098 7 FFFFFFFF.81622B70 Read Execute FFFFFFFF.862B9200 FFFFFFFF.862B94D0 00000000.00006000 00000000.000062D0 4;L Seq# LDRISD Image Name Base End Link End 0004 FFFFFFFF.81601D40 SYS$PLATFORM_SUPPORT 0 FFFFFFFF.81601E80 Read Write FFFFFFFF.8001B000 FFFFFFFF.8001B128 00000000.00002000 00000000.00002128 1 FFFFFFFF.81601ED0 Read FFFF8300.1060D300 FFFF8300.106116B0 00000000.80000000 00000000.800043B0 2 FFFFFFFF.81601F20 Read FFFF8300.10611700 FFFF8300.10611850 00000000.80006000 00000000.80006150 3 FFFFFFFF.81601F70 Read Execute FFFF8300.10611900 FFFF8300.10654198 00000000.80008000 00000000.8004A898 4 FFFFFFFF.81601FC0 Read Fixed FFFF8300.1065B900 FFFF8300.1065D3B0 00000000.80052000 00000000.80053AB0 5 FFFFFFFF.81602010 Read Write FFFFFFFF.8001B200 FFFFFFFF.800406E0 00000000.00004000 00000000.000294E0 8 FFFFFFFF.81602100 Read FFFF8300.1065D400 FFFF8300.1065D450 00000000.80058000 00000000.80058050 9 FFFFFFFF.81602150 Read Execute FFFFFFFF.86250A00 FFFFFFFF.86251240 00000000.0002A000 00000000.0002A840 A FFFFFFFF.816021A0 Read FFFF8300.168C8000 FFFF8300.168D33D8 00000000.8005A000 00000000.800653D8 Symbol Vector FFFFFFFF.86250A00 1;L Loaded Image List: Seq Image Name Base End Link Base 50 SYS$SRDRIVER FFFF8300.111D0C00 FFFF8300.111D88F8 00000000.80000000 4E SYS$DMDRIVER FFFF8300.111CA900 FFFF8300.111CDDA0 00000000.80000000 4C SYS$TTDRIVER FFFF8300.1119E100 FFFF8300.111C2688 00000000.80000000 4A SYS$ISA_SUPPORT FFFF8300.11197F00 FFFF8300.1119A9C8 00000000.80000000 48 SYS$PCI_SUPPORT FFFF8300.11181700 FFFF8300.11192378 00000000.80000000 46 <SYS$LDR>TR$DEBUG FFFF8300.1117B500 FFFF8300.1117D7F0 00000000.80000000 44 <SYS$LDR>TQE$DEBUG FFFF8300.11177300 FFFF8300.111788F0 00000000.80000000 42 <SYS$LDR>IO$DEBUG FFFF8300.11173100 FFFF8300.11174420 00000000.80000000 40 SWIS$DEBUG FFFF8300.1116CF00 FFFF8300.1116FD28 00000000.80000000 3E ACME FFFF8300.11154B00 FFFF8300.111682B0 00000000.80000000 3C SYS$MME_SERVICES FFFF8300.11150A00 FFFF8300.11152748 00000000.80000000 3A SYSLDR_DYN FFFF8300.1112BD00 FFFF8300.11147F30 00000000.80000000 38 SYS$IPC_SERVICES FFFF8300.1106E800 FFFF8300.11114461 00000000.80000000 36 MULTIPATH FFFF8300.1105A200 FFFF8300.1106A930 00000000.80000000 34 SYS$UTC_SERVICES FFFF8300.11054000 FFFF8300.11057658 00000000.80000000 32 SYS$TRANSACTION_SERVICES FFFF8300.11002C00 FFFF8300.110419E0 00000000.80018000 30 SYSLICENSE FFFF8300.10FD2700 FFFF8300.10FE5F78 00000000.80006000 2E MESSAGE_ROUTINES FFFF8300.10FA3C00 FFFF8300.10FC93F8 00000000.80000000 2C SYS$VM FFFF8300.10E97D00 FFFF8300.10F81139 00000000.80000000 2A SYSGETSYI FFFF8300.10E7D700 FFFF8300.10E90A30 00000000.80000000 28 SECURITY_MON FFFF8300.10E18800 FFFF8300.10E6F258 00000000.80000000 26 IMAGE_MANAGEMENT FFFF8300.10DD1200 FFFF8300.10E0E350 00000000.80000000 24 RMS FFFF8300.10C34400 FFFF8300.10D9CAC0 00000000.80002000 22 F11BXQP FFFF8300.10B76C00 FFFF8300.10C18058 00000000.80000000 20 LOGICAL_NAMES FFFF8300.10B5A700 FFFF8300.10B728E8 00000000.80000000 1E SHELL8K FFFF8300.10B52400 FFFF8300.10B57D38 00000000.80000000 1C LOCKING FFFF8300.10B15900 FFFF8300.10B4A3E8 00000000.80000000 1A PROCESS_MANAGEMENT_MON FFFF8300.10A43200 FFFF8300.10AF5879 00000000.80000000 18 SYSDEVICE FFFF8300.10A32F00 FFFF8300.10A3E4D0 00000000.80000000 16 IO_ROUTINES_MON FFFF8300.1096E900 FFFF8300.10A0FFD0 00000000.80000000 14 EXCEPTION_MON FFFF8300.10911000 FFFF8300.10965608 00000000.80000000 12 EXEC_INIT FFFF8300.108B2E00 FFFF8300.10900A78 00000000.80000000 10 SYS$OPDRIVER FFFF8300.108A6B00 FFFF8300.108AE5D0 00000000.80000000 0E SYSTEM_DEBUG FFFF8300.1081D200 FFFF8300.10891769 00000000.80000000 0C SYSTEM_SYNCHRONIZATION_UNI FFFF8300.107EC300 FFFF8300.108112F0 00000000.80000000 0A SYSTEM_PRIMITIVES_6 FFFF8300.10725B00 FFFF8300.107CBA40 00000000.80000000 08 SYS$ACPI FFFF8300.10676300 FFFF8300.106F83B0 00000000.80000000 06 ERRORLOG FFFF8300.1066E000 FFFF8300.106734D0 00000000.80000000 04 SYS$PLATFORM_SUPPORT FFFF8300.10610200 FFFF8300.1065D808 00000000.80000000 02 SYS$BASE_IMAGE FFFF8300.10602100 FFFF8300.1060CF90 00000000.80000000 00 SYS$PUBLIC_VECTORS FFFF8300.10600000 FFFF8300.10600028 00000000.80000000
;M – Set All Processes Writable
;M — Sets the address spaces of all processes to be writable or read-only by your DELTA
process. This command can be used only with DELTA. Use of this command requires CMKRNL
privilege. On Alpha, this command also sets writable the general purpose
registers of other processes, if, after issuing the ;M command, you specify
another process with any command that takes the PID argument, such as the /
command.
Synopsis
;M Argument
Specifies your process privileges for reading and writing at other processes. If 0, your DELTA process can only read locations in other processes; if 1, your process can read or write any location in any process. If not specified, DELTA returns the current value of the M (modify) flag (0 or 1).
Description
Note
Use this activity very carefully during time sharing. It affects all processes on the system. For this reason, your process must have change-mode-to-kernel (CMKRNL) privilege to use this command. It is safest to use this command only on a standalone system.
;P – Proceed from Breakpoint
;P — Continues program execution following a breakpoint.
Synopsis
;P Description
Note
If DELTA/XDELTA does not have write access to the target of a JSR instruction, you cannot
use the S or ;P command at the JSR instruction. First,
you must use the O command; then you can use the S or
;P command.
Example
The following examples illustrate the command on each OpenVMS platform.
G0BF5D60,0;XG0BF5D60 X0+60;B 1 00000060
;P
Brk 1 at X0+00000060 on CPU 0
X0+00000060! alloc r53 = ar.pfs, 18, 08, 00 (New IPL = 0) - (New mode = USER)
;B 1 00030010;P
Brk 1 at 00030010 00030010! STQ R26,#X0008(SP)
![]()
;Q – Validate Queue (IA-64 and Alpha Only)
;Q — Analyzes absolute and self-relative longword queues and displays the results of the
analysis.
Synopsis
;Q Argument
The queue header must be at least longword aligned.
A queue type of zero (the default) represents an absolute queue. A queue type of 1 indicates a self-relative queue.
Description
The validate queue function is similar to the one in the OpenVMS System Dump Analyzer Utility. It can analyze both absolute and self-relative longword queues and display the results of the analysis. This function identifies various problems in the queue headers and invalid backward links for queue entries and evaluates the readability of both. For valid queues, it tells you the total number of entries. For invalid queues, it tells you the queue entry number and the address that is invalid and why.
Example
FFFFFFFF8000F00D;Q !Absolute at GF00D GF00D,0;Q !Absolute at GF00D GF00,1;Q !Self-relative at GF00
;T – Display Interrupt Stack Frame on XDELTA (IA-64
Only)
;T — XDELTA only; displays contents of an interrupt stack frame.
Synopsis
;T Arguments
The address of the stack frame. This is an optional argument. If not specified, the
;T command without any argument displays the interrupt stack frame with
which XDELTA was invoked.
Description
On IA-64 systems, the XDELTA ;T command displays the contents of an
interrupt stack frame.
Example
;T command displays the machine state at
the time of the exception.;T
* Exception Frame Display: *
Exception taken at IP FFFFFFFF.8063D830, slot 01
from Kernel mode Exception Frame at FFFFFFFF.89DA1CE0
Trap Type 00000080 (External Interrupt)
IVT Offset 00003000 (External Interrupt)
External Interrupt Vector 00000000
* = Value read directly from the register rather than the frame
Control Registers:
CR0 Default Control Register (DCR) 00000000.00007F00
CR1 Interval Timer Match Register (ITM) * 0000C6F7.31F82D5B
CR2 Interruption Vector Address (IVA) * FFFFFFFF.801D0000
CR8 Page Table Address (PTA) * FFFFFFFF.7FFF013D
CR16 Processor Status Register (IPSR) 00001210.0A026010
CR17 Interrupt Status Register (ISR) 00000200.00000000
CR19 Instruction Pointer (IIP) FFFFFFFF.8063D830
CR20 Faulting Address (IFA) FFFFFFFF.88580078
CR21 TLB Insertion Register (ITIR) 00000000.00000334
CR22 Instruction Previous Address (IIPA) FFFFFFFF.8063D830
CR23 Function State (IFS) 80000000.00000FA7
CR24 Instruction immediate (IIM) FFFFFFFF.88580078
CR25 VHPT Hash Address (IHA) FFFFFFFF.7FFF5860
CR64 Local Interrupt ID (LID) * 00000000.00000000
CR66 Task Priority Register (TPR) * 00000000.00010000
CR68 External Interrupt Req Reg 0 (IRR0) * 00000000.00000000
CR69 External Interrupt Req Reg 1 (IRR1) * 00000000.00000000
CR70 External Interrupt Req Reg 2 (IRR2) * 00000000.00000000
CR71 External Interrupt Req Reg 3 (IRR3) * 00020000.00000000
CR72 Interval Time Vector (ITV) * 00000000.000000F1
CR73 Performance Monitoring Vector (PMV) * 00000000.000000FB
CR74 Corrected Machinecheck Vector (CMCV) * 00000000.00010000
CR80 Local Redirection Register 0 (LRR0) * 00000000.00010000
CR81 Local Redirection Register 1 (LRR1) * 00000000.00010000
Application Registers:
AR0 Kernel Register (KR0) * 00000000.20570000
AR1 Kernel Register (KR1) * 00000000.60000000
AR2 Kernel Register (KR2) * 00000000.00000000
AR3 Kernel Register (KR3) * 00000000.00000000
AR4 Kernel Register (KR4) * 00000000.00000000
AR5 Kernel Register (KR5) * 0000C6F7.31F82D5B
AR6 Kernel Register (KR6) * FFFFFFFF.84C3E000
AR7 Kernel Register (KR7) * FFFFFFFF.89D4B000
AR16 Register Stack Config Reg (RSC) 00000000.00000000
AR17 Backing Store Pointer (BSP) FFFFF802.A3EAC300
AR18 Backing Store for Mem Store (BSPSTORE) FFFFF802.A3EAC300
AR19 RSE NaT Collection Register (RNAT) 00000000.00000000
AR32 Compare/Exchange Comp Value Reg (CCV) FFFFFFFF.84132680
AR36 User NaT Collection Register (UNAT) 00000000.00000000
AR40 Floating-point Status Reg (FPSR) 0009804C.0270033F
AR44 Interval Time Counter (ITC) * 0000C6FB.A91997B5
AR64 Previous Function State (PFS) 00000000.00000FA7
AR65 Loop Count Register (LC) 00000000.00000000
AR66 Epilog Count Register (EC) 00000000.00000000
Processor Status Register (IPSR):
AC = 0 MFL= 1 MFH= 0 IC = 1 I = 1 DT = 1
DFL= 0 DFH= 0 RT = 1 CPL= 0 IT = 1 MC = 0 RI = 1
Interrupt Status Register (ISR):
Code 00000000 X = 0 W = 0 R = 0 NA = 0 SP = 0
RS = 0 IR = 0 NI = 0 SO = 0 EI = 1 ED = 0
Branch Registers: Region Registers:
B0 FFFFFFFF.8063C570 RR0 * 00000000.00000035
B1 00000000.00000000 RR1 * 00000000.00000030
B2 00000000.00000000 RR2 * 00000000.00000030
B3 00000000.00000000 RR3 * 00000000.00000030
B4 00000000.00000000 RR4 * 00000000.00000030
B5 00000000.00000000 RR5 * 00000000.00000030
B6 FFFFFFFF.80001580 RR6 * 00000000.00000030
B7 FFFFFFFF.806F4D30 RR7 * 00000000.00000335
Floating Point Registers: FPSR 0009804C.0270033F
F6 00000000.0001003E.00000000.0000FCBE
F7 00000000.0001003E.00000000.00000040
F8 00000000.0001003E.00000000.003F2F80
F9 00000000.00010003.80000000.00000000
F10 00000000.0000FFFB.80000000.00000000
F11 00000000.0000FFFB.80000000.00000000
Miscellaneous Registers:
Processor Identifier (CPUID 0,1) GenuineIntel
(CPUID 3) 00000000.1F010504
Interrupt Priority Level (IPL) 00000003
Stack Align 000002D0
NaT Mask 001C
PPrev Mode 00
Previous Stack 00
Interrupt Depth 00
Preds 00000000.FF65CCA3
Nats 00000000.00000000
Context 00000000.FF61CEA3
General Registers:
R0 00000000.00000000 GP FFFFFFFF.8442E200 R2 FFFFFFFF.84132688
R3 FFFFFFFF.8442E200 R4 FFFFFFFF.8442E200 R5 00000000.00000001
R6 FFFFFFFF.84C3E000 R7 00000000.00000000 R8 00000000.00000003
R9 00000000.00000009 R10 00000000.00000008 R11 00000000.00000000
SP FFFFFFFF.89DA0D18 TP 00000000.00000000 R14 00000000.00000001
R15 FFFFFFFF.8401BD90 R16 FFFFFFFF.84017508 R17 FFFFFFFF.84009E98
R18 FFFFFFFF.84C3F274 R19 00000000.00000000 R20 FFFFFFFF.84009E00
R21 FFFFFFFF.84132627 R22 FFFFFFFF.84C3E01C R23 00000000.0000000F
R24 00000000.00011F90 R25 00000000.00000003 R26 00000000.00000000
R27 FFFFFFFF.84132668 R28 FFFFFFFF.8416D7C8 R29 FFFFFFFF.89DA1FB0
R30 00000000.7FF2E318 R31 00000000.00000000
Interrupted Frame RSE Backing Store , Size = 39 registers
FFFFF802.A3EAC300: FFFFFFFF.84C3E080 (R32)
FFFFF802.A3EAC308: E0000000.00000000 (R33)
FFFFF802.A3EAC310: FFFFFFFF.84132628 (R34)
FFFFF802.A3EAC318: FFFFFFFF.88598080 (R35)
FFFFF802.A3EAC320: 00000000.00000001 (R36)
FFFFF802.A3EAC328: FFFFFFFF.806029A0 (R37)
FFFFF802.A3EAC330: 00000000.FF65C563 (R38)
FFFFF802.A3EAC338: 00000000.00000000 (R39)
FFFFF802.A3EAC340: FFFFFFFF.8442E200 (R40)
FFFFF802.A3EAC348: FFFFFFFF.806029C0 (R41)
FFFFF802.A3EAC350: FFFFFFFF.8442E200 (R42)
FFFFF802.A3EAC358: FFFFFFFF.88598080 (R43)
FFFFF802.A3EAC360: FFFFFFFF.84191000 (R44)
FFFFF802.A3EAC368: 00000000.00000009 (R45)
FFFFF802.A3EAC370: FFFFFFFF.8416D7C8 (R46)
FFFFF802.A3EAC378: FFFFFFFF.8442E200 (R47)
FFFFF802.A3EAC380: 00000000.00000000 (R48)
FFFFF802.A3EAC388: FFFFFFFF.84132668 (R49)
FFFFF802.A3EAC390: 00000000.00000008 (R50)
FFFFF802.A3EAC398: 00000000.00000000 (R51)
FFFFF802.A3EAC3A0: 00000000.7FF2E318 (R52)
FFFFF802.A3EAC3A8: 00000000.00000000 (R53)
FFFFF802.A3EAC3B0: 00000000.00000FB2 (R54)
FFFFF802.A3EAC3B8: FFFFFFFF.84132627 (R55)
FFFFF802.A3EAC3C0: 00000000.00000003 (R56)
FFFFF802.A3EAC3C8: FFFFFFFF.89DA1FB0 (R57)
FFFFF802.A3EAC3D0: FFFFFFFF.801D9BD0 (R58)
FFFFF802.A3EAC3D8: FFFFFFFF.806029C0 (R59)
FFFFF802.A3EAC3E0: 00000000.00000001 (R60)
FFFFF802.A3EAC3E8: FFFFFFFF.89DA1FB0 (R61)
FFFFF802.A3EAC3F0: FFFFFFFF.8442E200 (R62)
FFFFF802.A3EAC400: 00000000.00000003 (R63)
FFFFF802.A3EAC408: FFFFFFFF.8063C570 (R64)
FFFFF802.A3EAC410: 00000000.00000008 (R65)
FFFFF802.A3EAC418: 00000000.00000008 (R66)
FFFFF802.A3EAC420: FFFFFFFF.84132668 (R67)
FFFFF802.A3EAC428: FFFFFFFF.8416D7C8 (R68)
FFFFF802.A3EAC430: 00000000.00000008 (R69)
FFFFF802.A3EAC438: FFFFFFFF.8416DAA0 (R70);W – List Name and Location of a Single Loaded Image (IA-64
and Alpha Only)
;W — Lists information about an image that contains the address you supplied.
Synopsis
;W ;W Arguments
An address contained within an executive image or a user image.
The identifier assigned to an executive image.
The distance from the base address of the image.
Description
The ;W command is used for debugging code that resides in system or user
space. You can use this command with XDELTA for debugging an executive image. You can also use
this command with DELTA.
To examine the executive image list, you must be running in executive mode or your process must have change-mode-to-executive (CMEXEC) privilege.
This command can be used in two ways. In the first way, if you supply an address that you are trying to locate, the command lists the name of the executive or user image that contains the address, its base and ending addresses, and the offset of the address from the base of the image. For any executive image that has been sliced, it also displays its sequence number. The offset can be used with the link map of the image to locate the actual code or data. This offset is saved in the value Q.
In the second way, if you supply the sequence number of a sliced executive image and an offset, the command computes and displays the address in memory. The address is saved in the value Q.
Examples
;L, except
the offset is displayed for you, as shown in the following
example:80026530;W
Seq# Image Name Base End Image Offset
000C SYSTEM_SYNCHRONIZATION.EXE
Nonpaged read only 80024000 8002C800 00002530;L, except that the system space address that corresponds to the image
offset is displayed, as shown in the following
example:C,2530;W
Seq# Image Name Base End Address
000C SYSTEM_SYNCHRONIZATION.EXE
Nonpaged read only 80024000 8002C800 80026530In the following example the command is used with the current location pointer after following a jump instruction to a new address.
FFFF8300.108B998C!movq %rax,(%rbx) .;W Seq# LDRISD Image Name Base End Offset 0012 FFFFFFFF.81604480 EXEC_INIT 2 FFFFFFFF.81604658 Read Execute FFFF8300.1088C700 FFFF8300.108DFA28 00000000.8003328C
;X – Load Base Register
;X — Places an address in a base register.
Synopsis
;X Arguments
On IA-64 and Alpha, a parameter for modifying the default offset of 1000016. The valid range is 1 to FFFFFFFF.
Description
An expression followed by a comma (,), or
A number from 0 to 1510, or optionally, a number from 1 to FFFFFFFF, a semicolon (;)
The letter X.
On all platforms, DELTA/XDELTA places the address in the base register. DELTA/XDELTA confirms that the base register is set by displaying the value deposited in the base register.
402,0;X Return
00000402Whenever DELTA/XDELTA displays an address, it will display a relative address if the address falls within the computer's valid range for an offset from a base register. The relative address consists of the base register identifier (Xn), followed by an offset. The offset gives the address location in relation to the address stored in the base register.
For example, if base register 2 contains 800D046A, the address that would be displayed is X2+C4, the base register identifier followed by the offset.
Relative addresses are computed for both opened and displayed locations and for addresses that are instruction operands.
If you have defined several base registers, the offset will be relative to the closest base register. If an address falls outside the valid range, it is displayed as a hexadecimal value.
On all platforms, the default offset is 10000016, which can be modified.
Examples
The following examples illustrate the command on each platform.
30000,0;X00030000 30070,1,200;X
00030070 ;X
0 00030000 1 00030070 00000200 S
X0+00000004! BIS R31,R31,R18 x1+10! STQ FP,#X0020(SP)
The base address of the program (determined from the map file) is virtual address 30000.
The base address is stored in base register 0 with | |
The address of a subroutine, 30070, is stored in base register 1, specifying a new offset of 200 (to override the default value of 100000). Note that this command could also have been expressed as "x0+70,1,200;X". DELTA/XDELTA displays the value in base register 1 just loaded, 30070. | |
The | |
The | |
The instruction at offset 10 from base register 1 is displayed in instruction mode using
the |
O – Step Instruction over Subroutine
O — Executes one instruction, steps over a subroutine by executing it, and displays the
instruction to which the subroutine returns control.
Synopsis
O Description
The Step Instruction over Subroutine command executes one instruction and displays the
address of the next instruction. If the instruction executed is a call to a subroutine, the
subroutine is executed and the next instruction displayed is the instruction to which the
subroutine returns control. Use this command to do single-step instruction execution excluding
single-stepping of instructions within subroutines. If you want to do single-step execution of
all instructions, including those in subroutines, use the S command.
This command 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. The Open Location and Display Contents (/) command clears the
flag, causing the display mode to revert to longword, hexadecimal mode.
On IA-64, the subroutine call instruction is br.call.
On Alpha, the subroutine call instructions are JSR and BSR.
On x86-64, the subroutine call instructions is CALLQ.
On all platforms, if you set a breakpoint in the subroutine and enter the
O command, program execution breaks at the subroutine breakpoint. When you
enter a Proceed command (;P), and program execution returns to the
instruction to which the subroutine returns control, a message is displayed, as follows:
Step-over at nnnnnnnn instruction
The message informs you that program execution has returned from a subroutine.
If you are using XDELTA in a multiprocessor environment, the CPU ID of the processor where the break was taken is also displayed.
On IA-64 and Alpha, the CPU ID is displayed as a decimal number with no leading zeros.
Examples
The following examples illustrate the command on each OpenVMS platform.
X0+00000380! mov r7 = r23SX0+00000381! nop.f 000000S X0+00000382! br.call.sptk.many b0 = 0000E30 O
X0+00000390! mov r29 = r41S
X0+00000391! mov r1 = r40S
Program execution is currently at Base Register X0, plus offset 00000380. The
instruction at X0+380 is a Move Application Register instruction. Step execution is then
continued using the | |
Program execution is stopped at Base Register X0, plus offset 00000381. The instruction
at offset 00000381 is a No Operation instruction. Step execution is then continued using the
| |
Program execution is stopped at offset 00000382. The instruction at 00000382 is a
"br.call" instruction. Execution is continued using the |
30040;B30070;B
;B 1 00030040 2 00030070 ;P
Brk 1 at 00030040 00030040! LDA R27,#XFFC8(R2) O
00030044! BSR R26,#X00000A O
Brk 2 at 00030070 00030070! LDA SP,#XFFD0(SP) ;P
Step-over at 30048 00030048! LDQ R26,#X0048(R2) S
0003004C! BIS R31,R31,R17
A simple breakpoint is set in the main routine at address 30040, just prior to the subroutine call. | |
A simple breakpoint is set in the subroutine at address 30070. The breakpoints are
displayed using the | |
Program execution continues using | |
Program execution stops at breakpoint 1. DELTA/XDELTA displays the breakpoint message
and the instruction at the breakpoint address. The | |
The next instruction is a subroutine call (BSR). The subroutine is stepped over using
the | |
Ordinarily, the step-over would continue execution at the instruction following the
subroutine call. However, in this case, program execution stops at breakpoint 2 inside the
subroutine at address 30070. Program execution continues with the | |
The subroutine completes execution. DELTA/XDELTA displays a step-over break message that
indicates that the |
S – Step Instruction
S — Executes one instruction and displays the next. If the executed instruction is a call
to a subroutine, it steps into the subroutine and displays the next instruction to be executed
in the subroutine.
Synopsis
S Description
The Step Instruction command executes one instruction and displays the next instruction (in
instruction mode) and its address. Use this command to single-step instructions, including
single-stepping all instructions in subroutines. If you want to exclude single-stepping
instructions in subroutines, use the O command.
The instruction displayed has not yet been executed. This command 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. The Open
Location and Display Contents (/) command clears the flag, causing the
display mode to revert to longword, hexadecimal mode.
On IA-64, if the instruction is a br.call instruction, Step moves to the subroutine called by these instructions and displays the first instruction within the subroutine.
Note
If DELTA/XDELTA does not have write access to the target of a JSR instruction,you cannot
use the S or ;P command at the JSR instruction. First,
you must use the O command; then you can use the S or
;P command.
Move to the instruction where you want to start single-step execution by
placing a breakpoint at that instruction and typing ;P. Then press
S to execute the first instruction and display the next one.
Examples
X0+00000061! mov r52 = b0 SX0+00000062! mov r40 = r1 S
X0+00000070! st8 [r12] = r0 ;;
Program execution has been stopped at base register X0 plus offset 0000061. The
instruction at this address is a Move Branch Register. Step execution is continued using the
| |
Program execution is now stopped at base register X0 plus offset 0000062. The
instruction at this address is a Move Application Register. Step execution is then continued
using the | |
The instruction at offset 0000070 is displayed. |
0003003C! BLBC R0,#X000006 S00030040! LDQ R16,#X0050(R2) S
00030044! BIS R31,R31,R17 S
00030048! LDQ R26,#X0040(R2)
Step program execution is started at address 3003C. The instruction at 3003C is a
conditional branch instruction. Step execution is continued using the | |
Because the condition (BLBC) was not met, program execution continued at the next
instruction at address 30040. Had the branch been taken, execution would have continued at
address 30058. The second | |
The instruction at address 30044 is displayed. The |
Appendix A. Sample DELTA Debug Session on IA-64
SYS$GETJPIW to obtain the PID, process name, and login time of each
process. To run the example program without error, you need WORLD privilege. Note
Although this example debugging session demonstrates using the DELTA debugger, you could use most of the commands in the example in an XDELTA debugging session as well.
Section A.1, ''Listing File for C Example Program'' shows the source and machine listing files for the example C program.
Section A.2, ''Example DELTA Debugging Session on IA-64'' shows the example DELTA debugging session and explains the various commands used and information provided.
A.1. Listing File for C Example Program
See Section A.2, ''Example DELTA Debugging Session on IA-64'' for the corresponding sample debugging session using this program.
A.1.1. Source Listing for IA-64 Debugging Example
1 #include <descrip.h>
973 #include <jpidef.h>
1378 #include <ssdef.h>
5641 #include <starlet.h>
9024 #include <stdio.h>
0606 #include <stdlib.h>
2406
22407 void print_line(unsigned long int pid,
22408 char *process_name,
22409 unsigned long int *time_buffer);
22410
22411 typedef struct {
22412 unsigned short int il3_buffer_len;
22413 unsigned short int il3_item_code;
22414 void *il3_buffer_ptr;
22415 unsigned short int *il3_return_len_ptr;
22416 } item_list_3;
22417
22418 #define NUL '\0'
22419
22420 main(void)
22421{
22422 static char name_buf[16];
22423 static unsigned long int pid, time_buf[2];
22424 static unsigned short int name_len;
22425
22426 unsigned short int pidadr[2] = {-1, -1};
22427 unsigned long int ss_sts;
22428 item_list_3 jpi_itmlst[] = {
22429 /* Get login time */
22430 { sizeof(time_buf),
22431 JPI$_LOGINTIM,
22432 (void *) time_buf,
22433 NULL
22434 },
22435
22436 /* Get process name */
22437 { sizeof(name_buf) - 1,
22438 JPI$_PRCNAM,
22439 (void *) name_buf,
22440 &name_len
22441 },
22442
22443 /* Get process ID (PID) */
22444 { sizeof(pid),
22445 JPI$_PID,
22446 (void *) &pid,
22447 NULL
22448 },
22449
22450 /* End of list */
22451 { 0,
22452 0,
22453 NULL,
22454 NULL
22455 }
22456 };
22457
22458 /*
22459 * While there's more GETJPI information to process and a
22460 * catastrophic error has not occurred then
22461 * If GETJPI was successful then
22462 * NUL terminate the process name string and
22463 * print the information returned by GETJPI
22464 */
22465
22466 while((ss_sts = sys$getjpiw(0, &pidadr, 0, &jpi_itmlst, 0, 0, 0)) != SS$_NOMOREPROC &&
22467 ss_sts != SS$_BADPARAM &&
22468 ss_sts != SS$_ACCVIO) {
22469
22470 if (ss_sts == SS$_NORMAL) {
22471 *(name_buf + name_len) = NUL;
22472 print_line(pid, name_buf, time_buf);
22473 }
22474 }
22475 exit(EXIT_SUCCESS);
22476 }
22477
22478 void print_line(unsigned long int pid,
22479 char *process_name
22480 unsigned long int *time_buffer)
22481 {
22482 static char ascii_time[12];
22483
22484 struct dsc$descriptor_s time_dsc = {
22485 sizeof(ascii_time) - 1,
22486 DSC$K_DTYPE_T,
22487 DSC$K_CLASS_S,
22488 ascii_time
22489 1
22490 unsigned short int time_len;
22491
22492 /*
22493 Convert the logged in time to ASCII and NUL terminate it
22494 */
22495 sys$asctim(&time_len, &time_dsc, time_buffer, 1);
22496 *(ascii_time + time_len) = NUL;
22497
22498 /*
22499 Output the PID, process name and logged in time
22500 */
22501 printf("\n\tPID= %08.8X\t\tPRCNAM= %s\tLOGINTIM= %s",
22502 pid,
22503 process_name,
22504 ascii_time);
22505
22506 return;
22507 }A.1.2. Machine Code Listing for IA-64 Debugging Example
.psect $CODE$, CON, LCL, SHR, EXE, NOWRT, NOVEC, NOSHORT
.proc __MAIN
.align 32
.global __MAIN
.personality DECC$$SHELL_HANDLER
.handlerdata
__MAIN: // 02242
{ .mii 002C00F2EB40 0000 alloc r45 = rspfs, 6, 9, 8, 0
010800C00080 0001 mov r2 = sp // r2 = r12
0120000A0380 0002 mov r14 = 80 ;;
}
{ .mmi 010028E183C0 0010 sub r15 = sp, r14 ;; // r15 = r12, r14
0080C0F00380 0011 ld8 r14 = [r15]
010800F00300 0012 mov sp = r15 ;; // r12 = r15
}
{ .mii 000008000000 0020 nop.m 0
000188000B00 0021 mov r44 = rp // r44 = br0
010800100B80 0022 mov r46 = gp ;; // r46 = r1
}
⋮
{ .mii 010802E00040 0100 mov gp = r46 // r1 = r46
00015405A000 0101 mov.i rspfs = r45
000E00158000 0102 mov rp = r44 ;; // br0 = r44
}
{ .mbb 010800CA0300 0110 adds sp = 80, sp // r12 = 80, r12
000108001100 0111 br.ret.sptk.many rp // br0
004000000000 0112 nop.b 0 ;;
}
.endp __MAINRoutine Size: 288 bytes, Routine Base: $CODE$ + 0000 .proc MAIN
.align 32
.global MAIN
MAIN: // 022420
{ .mii
002C00A22A00 0120 alloc r40 = rspfs, 0, 10, 7, 0
010800C00080 0121 mov r2 = sp // r2 = = r12
012000080380 0122 mov r14 = 64 ;;
}
{ .mmi
010028E183C0 0130 sub r15 = sp, r14 ;; // r5 = r12, r14
0080C0F00380 0131 ld8 r14 = [r15]
010800F00300 0132 mov sp = r15 ;; // r12 = r15
}
{ .mii
000008000000 0140 nop.m 0
0001880009C0 0141 mov r39 = rp // r39 = br0
010800100A40 0142 mov r41 = gp ;; // r41 = r1
}
.
.
.
{ .mbb
01C4321401C0 0280 cmp4.eq pr7, pr6 = ss_sts, r33 // pr7, pr6 = r32, r33
008600018007 0281 (pr7) br.cond.dpnt.many L$12
004000000000 0282 nop.b 0 ;;
}
.
.
.
{ .mib
0080C2B00AC0 0320 ld8.mov out1 = [r43], name_buf
012000100B00 0321 add out2 = @gprel(time_buf), gp // r44 = @gprel(time_buf), r1
00A000001000 0322 br.call.sptk.many rp = PRINT_LINE ;; // br0 = PRINT_LINE
}
{ .bbb
0091FFFDD000 0330 br.sptk.many L$10 // 022473
004000000000 0331 nop.b 0004000000000 0332 nop.b 0 ;; }
.
.
.
{ .mii
000008000000 0370 nop.m 0
000E0014E000 0371 mov rp = r39 // br0 = r39
010800C80300 0372 adds sp = 64, sp ;; // r12 = 64, r12
}
{ .bbb
000108001100 0380 br.ret.sptk.many rp // br0
004000000000 0381 nop.b 0
004000000000 0382 nop.b 0 ;;
}
.endp MAIN
Routine Size: 624 bytes, Routine Base: $CODE$ + 0120 .proc PRINT_LINE
.align 32
.global PRINT_LINE
PRINT_LINE: // 022478
{ .mii
002C0091A9C0 0390 alloc r39 = rspfs, 3, 6, 4, 0
010800C00080 0391 mov r2 = sp // r2 = r12
012000020380 0392 mov r14 = 16 ;;
}
{ .mmi
010028E183C0 03A0 sub r15 = sp, r14 ;; // r15 = r12, r14
0080C0F00380 03A1 ld8 r14 = [r15]
010800F00300 03A2 mov sp = r15 ;; // r12 = r15
}
.
.
.
{ .mmi
012000100B00 0490 add out3 = @ltoffx(ascii_time), gp ;; //r44 = @ltoffx(ascii_time), r1
0080C2C00B00 0491 ld8.mov out3 = [r44], ascii_time
012000008640 0492 mov ai = 4 ;; // r25 = 4
}
{ .bbb
00A000001000 04A0 br.call.sptk.many rp = DECC$TXPRINTF // br0 = DECC$TXPRINTF
004000000000 04A1 nop.b 0
004000000000 04A2 nop.b 0 ;;
}
{ .mii
010802800040 04B0 mov gp = r40 // r1 = r40
00015404E000 04B1 mov.i rspfs = r39 // 022506
000E0014C000 04B2 mov rp = r38 ;; // br0 = r38
}
{ .mbb
010800C20300 04C0 adds sp = 16, sp // r12 = 16, r12
000108001100 04C1 br.ret.sptk.many rp // br0
004000000000 04C2 nop.b 0 ;;
}
.endp PRINT_LINE
Routine Size: 320 bytes, Routine Base: $CODE$ + 0390.MAP file for the sample program is shown in Example A.5, ''.MAP File for the Sample Program''.Only the Program Section Synopsis with the psect, module, base
address, end address, and length are listed. .MAP File for the Sample Program +--------------------------+
! Program Section Synopsis !
+--------------------------+
Psect Name Module/Image Base End Length
---------- ------------ ---- --- ------
$BSS$ 00010000 0001001F 00000020 ( 32.)
LOG 00010000 0001001F 00000020 ( 32.)
$CODE$ 00020000 0002061F 00000620 ( 1568.)
LOG 00020000 000204CF 000004D0 ( 1232.)
<Linker> 000204D0 0002061F 00000150 ( 336.)
$LITERAL$ 00030000 00030058 00000059 ( 89.)
LOG 00030000 00030058 00000059 ( 89.)
$READONLY$ 00030060 00030087 00000028 ( 40.)
LOG 00030060 00030087 00000028 ( 40.)
$LINK$ 00040000 00040000 00000000 ( 0.)
LOG 00040000 00040000 00000000 ( 0.)
$LINKER UNWIND$ 00040000 00040047 00000048 ( 72.)
LOG 00040000 00040047 00000048 ( 72.)
$LINKER UNWINFO$ 00040048 000400B7 00000070 ( 112.)
LOG 00040048 000400B7 00000070 ( 112.)
.sbss 00050000 00050013 00000014 ( 20.)
LOG 00050000 00050013 00000014 ( 20.)
$LINKER SDATA$ 00060000 000600CF 000000D0 ( 208.)
<Linker> 00060000 000600CF 000000D0 ( 208.)A.2. Example DELTA Debugging Session on IA-64
The DELTA debugging session on OpenVMS IA-64 for the sample program is shown in the three example segments that follow.
DELTA Debugging Session Example on IA-64 - Part 1
In the first part of the example session, DELTA is enabled and the LOG program is invoked.
The example shows version information displayed by DELTA and the use of several key DELTA
commands, including !, ;B, and
;P.
$ DEFINE LIB$DEBUG SYS$SHARE:DELTA$ RUN/DEBUG LOG
hp OpenVMS Industry Standard 64 DELTA Debugger
Brk 0 at 00020000 00020000! alloc r45 = ar.pfs, 0F, 08, 00 20000,1;X 00020000 X1 280! cmp4.eq p7, p6 = r32, r33 .;B
X1 322! br.call.sptk.many b0 = 0000070 ;; .;B
;P Brk 1 at X1+00000280
X1+00000280! cmp4.eq p7, p6 = r32, r33 R32/00000000 00000001 ;P Brk 2 at X1+00000322 X1+00000322! br.call.sptk.many b0 = 0000070 ;; O PID= 37E00401 PRCNAM= SWAPPER LOGINTIM= 00:00:00.00
DELTA is enabled as the debugger. | |
The example program LOG is invoked with DELTA. | |
DELTA displays a banner and the first executable instruction. The base address of
the program (determined from the | |
The instruction at address 20280 is displayed in instruction mode using the
A simple breakpoint is set at that address using the | |
The same commands (that is, the | |
Program execution halts at the first breakpoint. DELTA displays the breakpoint
message (Brk 1 at X1+00000280) with the breakpoint number 1 and the address at which the
break occurred. The virtual address is 20280, which is the base address (20000) plus the
offset 280. DELTA then displays the instruction in instruction mode (cmp4.eq p7, p6 =
r32, r33). The contents of general register 32 are displayed with the forward slash (/)
command (register 32 contains the value of the | |
The function |
DELTA Debugging Session Example on IA-64 - Part 2
In the second part of the example session, program execution continues and DELTA stop sat
the next breakpoint and displays information. User interaction allows DELTA to continue
subsequent breakpoints. Use of the O command is demonstrated to halt
program execution and step over a routine call.
X1+00000330! br.many 1FFFEE0 ;PBrk 1 at X1+00000280 X1+00000280! cmp4.eq p7, p6 = r32, r33 ;P Brk 2 at X1+00000322 X1+00000322! br.call.sptk.many b0 = 0000070 ;; O
PID= 37E00407 PRCNAM= CLUSTER_SERVER LOGINTIM= 13:48:49.48 X1+00000330! br.many 1FFFEE0 ;P Brk 1 at X1+00000280 X1+00000280! cmp4.eq p7, p6 = r32, r33 ;B 1 X1+00000280 2 X1+00000322 0,1;B ;B 2 X1+00000322 ;P Brk 2 at X1+00000322
X1+00000322! br.call.sptk.many b0 = 0000070 ;; O PID= 37E00408 PRCNAM= CONFIGURE LOGINTIM= 13:48:52.06 X1+00000330! br.many 1FFFEE0 ;P Brk 2 at X1+00000322
X1+00000322! br.call.sptk.many b0 = 0000070 ;; O PID= 37E00409 PRCNAM= USB$UCM_SERVER LOGINTIM= 13:48:54.80 X1+00000330! br.many 1FFFEE0 ;P Brk 2 at X1+00000322
X1+00000322! br.call.sptk.many b0 = 0000070 ;; X1 491! ld8 r44 = [r44] Linefeed
X1+00000492! mov r25 = 000004 ;; Linefeed X1+000004A0! br.call.sptk.many b0 = 0000150 .;B
;B 1 X1+000004A0 2 X1+00000322 ;P
Brk 1 at X1+000004A0
X1+000004A0! br.call.sptk.many b0 = 0000150 O PID= 37E0040A PRCNAM= LANACP LOGINTIM= 13:48:54.84 X1+000004B0! mov r1 = r40 ;P Brk 2 at X1+00000322 X1+00000322! br.call.sptk.many b0 = 0000070 ;; ;P Brk 1 at X1+000004A0
X1+000004A0! br.call.sptk.many b0 = 0000150 O PID= 37E0040C PRCNAM= FASTPATH_SERVER LOGINTIM= 13:48:55.01 X1+000004B0! mov r1 = r40 ;P Brk 2 at X1+00000322 X1+00000322! br.call.sptk.many b0 = 0000070 ;; ;B 1 X1+000004A0 2 X1+00000322 0,2;B 0,1;B ;B ;P PID= 37E0040D PRCNAM= IPCACP LOGINTIM= 13:48:55.05 PID= 37E0040E PRCNAM= ERRFMT LOGINTIM= 13:48:55.14 PID= 37E0040F PRCNAM= CACHE_SERVER LOGINTIM= 13:48:55.19 PID= 37E00410 PRCNAM= OPCOM LOGINTIM= 13:48:55.24 PID= 37E00411 PRCNAM= AUDIT_SERVER LOGINTIM= 13:48:55.31 PID= 37E00412 PRCNAM= JOB_CONTROL LOGINTIM= 13:48:55.39 PID= 37E00414 PRCNAM= SECURITY_SERVER LOGINTIM= 13:48:55.84 PID= 37E00415 PRCNAM= ACME_SERVER LOGINTIM= 13:48:55.88 PID= 37E00416 PRCNAM= SMISERVER LOGINTIM= 13:49:02.26 PID= 37E0041E PRCNAM= NETACP LOGINTIM= 13:49:04.54 PID= 37E0041F PRCNAM= EVL LOGINTIM= 13:49:05.68 PID= 37E00420 PRCNAM= REMACP LOGINTIM= 13:49:13.39 PID= 37E00424 PRCNAM= TCPIP$INETACP LOGINTIM= 13:50:05.71 PID= 37E00425 PRCNAM= TCPIP$PORTM_1 LOGINTIM= 13:50:08.40 PID= 37E00426 PRCNAM= TCPIP$FTP_1 LOGINTIM= 13:50:08.77 PID= 37E0042A PRCNAM= LATACP LOGINTIM= 13:50:12.00 PID= 37E008E5 PRCNAM= SYSTEM LOGINTIM= 13:32:01.42 PID= 37E008E7 PRCNAM= JNELSON LOGINTIM= 13:41:17.48$
Program execution continues with the | |
The | |
Breakpoint 2 is encountered. DELTA displays the breakpoint message and the
instruction. The function is executed with the | |
Breakpoint 2 is encountered again. DELTA displays the breakpoint message and the
instruction. The function is executed with the | |
Breakpoint 2 is encountered again. The instruction at offset 491 (located in
| |
Successive address locations are displayed by pressing the Linefeed key
(Ctrl/J) twice. These instructions are the remainder
of the setup and the call to | |
A breakpoint at X1+4A0 (the current address) is set using the | |
Program execution continues with the | |
Program execution stops at the new breakpoint 1, which is in the
| |
Program execution stops at breakpoint 1 in the |
Appendix B. Sample DELTA Debug Session on Alpha
Note
Although this example debugging session demonstrates using the DELTA debugger, you could use most of the commands in the example in an XDELTA debugging session as well.
Section B.1, ''Listing File for C Example Program'' shows the source and machine listing files for the example C program
Section B.2, ''Example DELTA Debugging Session on Alpha'' shows the example DELTA debugging session and explains the various commands used and information provided.
B.1. Listing File for C Example Program
See Section B.2, ''Example DELTA Debugging Session on Alpha'' for the corresponding sample debugging session using this program.
B.1.1. Source Listing for Alpha Debugging Example
1 #include <descrip.h>
434 #include <jpidef.h>
581 #include <ssdef.h>
1233 #include <starlet.h>
3784 #include <stdio.h>
4117 #include <stdlib.h>
4345
4346 void print_line(unsigned long int pid, char *process_name,
4347 unsigned long int *time_buffer);
4348
4349 typedef struct {
4350 unsigned short int il3_buffer_len;
4351 unsigned short int il3_item_code;
4352 void *il3_buffer_ptr;
4353 unsigned short int *il3_return_len_ptr;
4354 } item_list_3;
4355
4356 #define NUL '\0'
4357
4358 main()
4359 {
4360 static char name_buf[16];
4361 static unsigned long int pid, time_buf[2];
4362 static unsigned short int name_len;
4363
4364 unsigned short int pidadr[2] = {-1, -1};
4365 unsigned long int ss_sts;
4366 item_list_3 jpi_itmlst[] = {
4367 /* Get's login time */
4368 {sizeof(time_buf),
4369 JPI$_LOGINTIM,
4370 (void *) time_buf,
4371 NULL},
4372
4373 /* Get's process name */
4374 {sizeof(name_buf) - 1,
4375 JPI$_PRCNAM,
4376 (void *) name_buf,
4377 &name_len},
4378
4379 /* Get's process ID (PID) */
4380 {sizeof(pid),
4381 JPI$_PID,
4382 (void *) &pid,
4383 NULL},
4384
4385 /* End of list */
4386 {0,
4387 0,
4388 NULL,
4389 NULL}
4390 };
4391
4392 /*
4393 While there's more GETJPI information to process and a catastrophic
4394 error has not occurred then
4395 If GETJPI was successful then
4396 NUL terminate the process name string and
4397 print the information returned by GETJPI
4398 */
4399
4400 while(
4401 (ss_sts = sys$getjpiw(0, &pidadr, 0, &jpi_itmlst, 0, 0, 0)) != SS$_NOMOREPROC &&
4402 ss_sts != SS$_BADPARAM &&
4403 ss_sts != SS$_ACCVIO)
4404 {
4405 if (ss_sts == SS$_NORMAL)
4406 {
4407 *(name_buf + name_len) = NUL;
4408 print_line(pid, name_buf, time_buf);
4409 }
4410 }
4411 exit(EXIT_SUCCESS);
4412 }
4413
4414 void print_line(unsigned long int pid, char *process_name,
4415 unsigned long int *time_buffer)
4416 {
4417 static char ascii_time[12];
4418
4419 struct dsc$descriptor_s time_dsc = {
4420 sizeof(ascii_time) - 1,
4421 DSC$K_DTYPE_T,
4422 DSC$K_CLASS_S,
4423 ascii_time
4424 };
4425 unsigned short int time_len;
4426
4427 /*
4428 Convert the logged in time to ASCII and NUL terminate it
4429 */
4430 sys$asctim(&time_len, &time_dsc, time_buffer, 1);
4431 *(ascii_time + time_len) = NUL;
4432
4433 /*
4434 Output the PID, process name and logged in time
4435 */
4436 printf("\n\tPID= %08.8X\t\tPRCNAM= %s\tLOGINTIM= %s", pid,
4437 process_name, ascii_time);
4438
4439 return;
4440 )
4441 __main(void *p1, void *p2, void *p3, void *p4, void *p5, void *p6)
4442 {
4443 void decc$exit(int);
4444 void decc$main(void *, void *, void *, void *, void *, void *, int *, void **, void **);
4445 int status;
4446 int argc;
4447 void *argv;
4448 void *envp;
4449
4450 decc$main(p1, p2, p3, p4, p5, p6, &argc, &argv, &envp);
4451
4452 status = main4453 (
4454
4455
4456
4457 );
4458
4459 decc$exit(status);
4460 }B.1.2. Machine Code Listing for Alpha Debugging Example
.PSECT $CODE, OCTA, PIC, CON, REL, LCL, SHR,-
EXE, NORD, NOWRT
0000 print_line:: ; 004414
0000 LDA SP, -80(SP) ; SP, -80(SP)
0004 MOV 1, R19 ; 1, R19 ; 004430
0008 STQ R27, (SP) ; R27, (SP) ; 004414
000C MOV 4, R25 ; 4, R25 ; 004430
0010 STQ R26, 32(SP) ; R26, 32(SP) ; 004414
0014 STQ R2, 40(SP) ; R2, 40(SP)
0018 STQ R3, 48(SP) ; R3, 48(SP)
001C STQ R4, 56(SP) ; R4, 56(SP)
0020 STQ FP, 64(SP) ; FP, 64(SP)
0024 MOV SP, FP ; SP, FP
0028 MOV R27, R2 ; R27, R2
002C STL R17, process_name ; R17, 16(FP)
0030 LDQ R0, 40(R2) ; R0, 40(R2) ; 004419
0034 MOV R16, pid ; R16, R3 ; 004414
0038 LDQ R26, 48(R2) ; R26, 48(R2) ; 004430
003C LDA R16, time_len ; R16, 8(FP)
0040 LDQ R4, 32(R2) ; R4, 32(R2) ; 004423
0044 LDA R17, time_dsc ; R17, 24(FP) ; 004430
0048 STQ R0, time_dsc ; R0, 24(FP) ; 004419
004C LDQ R27, 56(R2) ; R27, 56(R2) ; 004430
0050 STL R4, 28(FP) ; R4, 28(FP) ; 004419
0054 JSR R26, SYS$ASCTIM ; R26, R26 ; 004430
0058 LDL R0, time_len ; R0, 8(FP) ; 004431
005C MOV pid, R17 ; R3, R17 ; 004436
0060 LDQ R27, 88(R2) ; R27, 88(R2)
0064 MOV R4, R19 ; R4, R19
0068 LDQ R26, 80(R2) ; R26, 80(R2)
006C MOV 4, R25 ; 4, R25
0070 ZEXTW R0, R0 ; R0, R0 ; 004431
0074 ADDQ R4, R0, R0 ; R4, R0, R0
0078 LDQ_U R16, (R0) ; R16, (R0)
007C MSKBL R16, R0, R16 ; R16, R0, R16
0080 STQ_U R16, (R0) ; R16, (R0)
0084 LDQ R16, 64(R2) ; R16, 64(R2) ; 004436
0088 LDL R18, process_name ; R18, 16(FP)
008C JSR R26, DECC$GPRINTF ; R26, R26
0090 MOV FP, SP ; FP, SP ; 004439
0094 LDQ R28, 32(FP) ; R28, 32(FP)
0098 LDQ R2, 40(FP) ; R2, 40(FP)
009C LDQ R3, 48(FP) ; R3, 48(FP)
00A0 LDQ R4, 56(FP) ; R4, 56(FP)
00A4 LDQ FP, 64(FP) ; FP, 64(FP)
00A8 LDA SP, 80(SP) ; SP, 80(SP)
00AC RET R28 ; R28
Routine Size: 176 bytes, Routine Base: $CODE + 0000
00B0 main:: ; 004358
00B0 LDA SP, -144(SP) ; SP, -144(SP)
00B4 MOV 48, R17 ; 48, R17 ; 004366
00B8 STQ R27, (SP) ; R27, (SP) ; 004358
00BC STQ R26, 64(SP) ; R26, 64(SP)
00C0 STQ R2, 72(SP) ; R2, 72(SP)
00C4 STQ R3, 80(SP) ; R3, 80(SP)
00C8 STQ R4, 88(SP) ; R4, 88(SP)
00CC STQ R5, 96(SP) ; R5, 96(SP)
00D0 STQ R6, 104(SP) ; R6, 104(SP)
00D4 STQ R7, 112(SP) ; R7, 112(SP)
00D8 STQ R8, 120(SP) ; R8, 120(SP)
00DC STQ FP, 128(SP) ; FP, 128(SP)
00E0 MOV SP, FP ; SP, FP
00E4 MOV R27, R2 ; R27, R2
00E8 LDA SP, -16(SP) ; SP, -16(SP)
00EC LDQ R26, 40(R2) ; R26, 40(R2) ; 004366
00F0 LDQ R18, 64(R2) ; R18, 64(R2)
00F4 LDA R16, jpi_itmlst ; R16, 16(FP)
00F8 JSR R26, OTS$MOVE ; R26, R26
00FC LDA R6, jpi_itmlst ; R6, 16(FP) ; 004401
0100 LDQ R3, -64(R2) ; R3, -64(R2) ; 004370
0104 LDA R7, pidadr ; R7, 8(FP) ; 004401
0108 LDQ R0, 32(R2) ; R0, 32(R2) ; 004364
010C MOV 2472, R8 ; 2472, R8 ; 004401
0110 STL R0, pidadr ; R0, 8(FP) ; 004364
0114 LDA R3, time_buf ; R3, 16(R3) ; 004370
0118 MOV R3, R5 ; R3, R5
011C STL R5, 20(FP) ; R5, 20(FP) ; 004366
0120 LDA R4, 8(R3) ; R4, 8(R3) ; 004376
0124 STL R4, 32(FP) ; R4, 32(FP) ; 004366
0128 LDA R17, 24(R3) ; R17, 24(R3)
012C STL R17, 36(FP) ; R17, 36(FP)
0130 LDA R19, 28(R3) ; R19, 28(R3)
0134 STL R19, 44(FP) ; R19, 44(FP)
0138 L$6: ; 004400
0138 LDQ R26, 48(R2) ; R26, 48(R2) ; 004401
013C CLR R16 ; R16
0140 LDQ R27, 56(R2) ; R27, 56(R2)
0144 MOV R7, R17 ; R7, R17
0148 STQ R31, (SP) ; R31, (SP)
014C CLR R18 ; R18
0150 MOV R6, R19 ; R6, R19
0154 CLR R20 ; R20
0158 CLR R21 ; R21
015C MOV 7, R25 ; 7, R25
0160 JSR R26, SYS$GETJPIW ; R26, R26
0164 CMPEQ ss_sts, 20, R16 ; R0, 20, R16 ; 004402
0168 CMPEQ ss_sts, R8, R17 ; R0, R8, R17 ; 004401
016C CMPEQ ss_sts, 12, R18 ; R0, 12, R18 ; 004403
0170 BIS R17, R16, R17 ; R17, R16, R17 ; 004401
0174 BIS R17, R18, R18 ; R17, R18, R18
0178 BNE R18, L$10 ; R18, L$10 ; 004400
017C CMPEQ ss_sts, 1, R0 ; R0, 1, R0 ; 004405
0180 BEQ R0, L$6 ; R0, L$6
0184 MOV R4, R17 ; R4, R17 ; 004408
0188 LDQ_U R19, 24(R3) ; R19, 24(R3) ; 004407
018C MOV R5, R18 ; R5, R18 ; 004408
0190 LDA R27, -96(R2) ; R27, -96(R2)
0194 EXTWL R19, R3, R19 ; R19, R3, R19 ; 004407
0198 ADDQ R4, R19, R19 ; R4, R19, R19
019C LDQ_U R22, (R19) ; R22, (R19)
01A0 MSKBL R22, R19, R22 ; R22, R19, R22
01A4 STQ_U R22, (R19) ; R22, (R19)
01A8 LDL R16, 28(R3) ; R16, 28(R3) ; 004408
01AC BSR R26, print_line ; R26, print_line
01B0 BR L$6 ; L$6 ; 004405
01B4 NOP ;
01B8 L$10: ; 004400
01B8 LDQ R26, 80(R2) ; R26, 80(R2) ; 004411
01BC CLR R16 ; R16
01C0 LDQ R27, 88(R2) ; R27, 88(R2)
01C4 MOV 1, R25 ; 1, R25
01C8 JSR R26, DECC$EXIT ; R26, R26
01CC MOV FP, SP ; FP, SP ; 004412
01D0 LDQ R28, 64(FP) ; R28, 64(FP)
01D4 MOV 1, R0 ; 1, R0
01D8 LDQ R2, 72(FP) ; R2, 72(FP)
01DC LDQ R3, 80(FP) ; R3, 80(FP)
01E0 LDQ R4, 88(FP) ; R4, 88(FP)
01E4 LDQ R5, 96(FP) ; R5, 96(FP)
01E8 LDQ R6, 104(FP) ; R6, 104(FP)
01EC LDQ R7, 112(FP) ; R7, 112(FP)
01F0 LDQ R8, 120(FP) ; R8, 120(FP)
01F4 LDQ FP, 128(FP) ; FP, 128(FP)
01F8 LDA SP, 144(SP) ; SP, 144(SP)
01FC RET R28 ; R28
Routine Size: 336 bytes, Routine Base: $CODE + 00B0
0200 __main:: ; 004441
0200 LDA SP, -48(SP) ; SP, -48(SP)
0204 MOV 9, R25 ; 9, R25 ; 004450
0208 STQ R27, (SP) ; R27, (SP) ; 004441
020C STQ R26, 24(SP) ; R26, 24(SP)
0210 STQ R2, 32(SP) ; R2, 32(SP)
0214 STQ FP, 40(SP) ; FP, 40(SP)
0218 MOV SP, FP ; SP, FP
021C LDA SP, -32(SP) ; SP, -32(SP)
0220 MOV R27, R2 ; R27, R2
0224 LDA R0, argc ; R0, 16(FP) ; 004450
0228 LDQ R26, 48(R2) ; R26, 48(R2)
022C LDA R1, argv ; R1, 12(FP)
0230 STQ R0, (SP) ; R0, (SP)
0234 LDA R0, envp ; R0, 8(FP)
0238 STQ R1, 8(SP) ; R1, 8(SP)
023C LDQ R27, 56(R2) ; R27, 56(R2)
0240 STQ R0, 16(SP) ; R0, 16(SP)
0244 JSR R26, DECC$MAIN ; R26, R26
0248 LDA R27, -96(R2) ; R27, -96(R2) ; 004452
024C BSR R26, main ; R26, main
0250 LDQ R27, 40(R2) ; R27, 40(R2) ; 004459
0254 MOV status, R16 ; R0, R16
0258 MOV 1, R25 ; 1, R25
025C LDQ R26, 32(R2) ; R26, 32(R2)
0260 JSR R26, DECC$EXIT ; R26, R26
0264 MOV FP, SP ; FP, SP ; 004460
0268 LDQ R28, 24(FP) ; R28, 24(FP)
026C LDQ R2, 32(FP) ; R2, 32(FP)
0270 LDQ FP, 40(FP) ; FP, 40(FP)
0274 LDA SP, 48(SP) ; SP, 48(SP)
0278 RET R28 ; R28
Routine Size: 124 bytes, Routine Base: $CODE + 0200.MAP file for the sample program is shown in Example B.3, ''.MAP File for the Sample Program''. Only the Program Section Synopsis with the psect,
module, base address, end address, and length are listed..MAP File for the Sample Program +--------------------------+
! Program Section Synopsis !
+--------------------------+
Psect Name Module Name Base End Length
---------- ----------- ---- --- ------
$LINKAGE 00010000 000100FF 00000100 ( 256.) LOG 00010000 000100FF 00000100 ( 256.)
$LITERAL 00010100 00010158 00000059 ( 89.) LOG 00010100 00010158 00000059 ( 89.)
$READONLY 00010160 00010160 00000000 ( 0.) LOG 00010160 00010160 00000000 ( 0.)
$INIT 00020000 00020000 00000000 ( 0.) LOG 00020000 00020000 00000000 ( 0.)
$UNINIT 00020000 0002002F 00000030 ( 48.) LOG 00020000 0002002F 00000030 ( 48.)
$CODE 00030000 0003027B 0000027C ( 636.) LOG 00030000 0003027B 0000027C ( 636.)B.2. Example DELTA Debugging Session on Alpha
The DELTA debugging session on OpenVMS Alpha for the sample program is shown in the three example segments that follow.
B.2.1. DELTA Debugging Session Example on Alpha - Part 1
In the first part of the example session, DELTA is enabled and the LOG program is invoked. The example shows version information displayed by DELTA and the use of the ;B and ;P commands.
$ DEFINE LIB$DEBUG SYS$LIBRARY:DELTA$ RUN/DEBUG LOG
Alpha/VMS DELTA Version 1.5
Brk 0 at 00030200 00030200! LDA SP,#XFFD0(SP) 30000,1;X X1 164! CMPEQ R0,#X14,R16 .;B
X1 1AC! BSR R26,#XFFFF94 .;B
DELTA is enabled as the debugger. | |
The example program LOG is invoked with DELTA. | |
DELTA displays a version number and the first executable instruction.
The base address of the program (determined from the map file) is
virtual address 30000. The base address is placed in base register 1
with | |
The instruction at address 30164 is displayed in instruction mode using !. Its address location is expressed as the base address plus an offset. In the listing file, the offset is 164. (This is the point where the return status from SYS$GETJPIW is checked.) The base address in base address register X1 is 30000. The address reference, then, is X1+164. Note the + sign is implied when not specified. A simple breakpoint is set at that address using the
| |
The |
B.2.2. DELTA Debugging Session Example on Alpha - Part 2
In the second part of the example session, program execution continues with ;P, then halts at the first breakpoint and displays information. User interaction allows DELTA to continue subsequent breakpoints.
;PBrk 1 at 00030164
X1+00000164! CMPEQ R0,#X14,R16 R0/ 00000001 ;P Brk 2 at 000301AC X1+000001AC! BSR R26,#XFFFF94 O PID= 00000021 PRCNAM= SWAPPER LOGINTIM= 00:00:00.00
X1+000001B0! BR R31,#XFFFFE1 ;P Brk 1 at 00030164 X1+00000164! CMPEQ R0,#X14,R16 R0/ 00000001 ;P Brk 2 at 000301AC X1+000001AC! BSR R26,#XFFFF94 O
PID= 00000024 PRCNAM= ERRFMT LOGINTIM= 16:24:01.03 X1+000001B0! BR R31,#XFFFFE1 ;P Brk 1 at 00030164 X1+00000164! CMPEQ R0,#X14,R16 ;B 1 00030164 2 000301AC 0,1;B ;B 2 000301AC ;P Brk 2 at 000301AC
X1+000001AC! BSR R26,#XFFFF94 O PID= 00000025 PRCNAM= OPCOM LOGINTIM= 16:24:02.56 X1+000001B0! BR R31,#XFFFFE1 ;P Brk 2 at 000301AC
X1+000001AC! BSR R26,#XFFFF94 O PID= 00000026 PRCNAM= AUDIT_SERVER LOGINTIM=16:24:03.66 X1+000001B0! BR R31,#XFFFFE1 ;P Brk 2 at 000301AC
X1+000001AC! BSR R26,#XFFFF94 X1 84! LDQ R16,#X0040(R2)
The | |
Program execution halts at the first breakpoint. DELTA displays the
breakpoint message (Brk 1 at 00030164) with the breakpoint number 1 and
the virtual address. The virtual address is 30164, which is the base
address (30000) plus the offset 164. DELTA then displays the instruction
in instruction mode (CMPEQ R0,#X14,R16). The contents of the general
register 0 are displayed with the / command. DELTA displays the contents
of R0, which is 1. Program execution continues using the
| |
The function print_line is executed, and the output (PID, process name, and login time) is displayed. | |
The O command halts program execution at the instruction where the
function returns control (BR R31,#XFFFFE1). (This is the point at which
control passes to checking the conditions of the while loop.) Program
execution continues with | |
Breakpoint 2 is encountered. DELTA displays the breakpoint message,
and the instruction. The function is executed with the
| |
Breakpoint 2 is encountered again. DELTA displays the breakpoint
message, and the instruction. The function is executed with the
| |
Breakpoint 2 is encountered again. The instruction at offset 84 (in
print_line) is displayed using |
B.2.3. DELTA Debugging Session Example on Alpha - Part 3
In the third part of the example session, successive address locations are
specified when the user presses Linefeed. Another breakpoint is
set, and program execution continues. DELTA stops at the break point, and the
;O command is used to halt execution and step over a routine
call. Program execution continues through more breakpoints to a final exit.
LinefeedX1+00000088! LDL R18,#X0010(FP)Linefeed X1+0000008C! JSR R26,(R26) .;B
;B 1 0003008C 2 000301AC ;P
Brk 1 at 0003008C
X1+0000008C! JSR R26,(R26) O PID= 00000027 PRCNAM= JOB_CONTROL LOGINTIM= 16:24:06.83 X1+00000090! BIS R31,FP,SP ;P Brk 2 at 000301AC X1+000001AC! BSR R26,#XFFFF94 ;P Brk 1 at 0003008C
X1+0000008C! JSR R26,(R26) O PID= 00000028 PRCNAM= NETACP LOGINTIM= 16:24:22.86 X1+00000090! BIS R31,FP,SP ;P Brk 2 at 000301AC X1+000001AC! BSR R26,#XFFFF94 ;B 1 0003008C 2 000301AC 0,2;B 0,1;B ;B ;P PID= 00000029 PRCNAM= EVL LOGINTIM= 16:24:26.67 PID= 0000002A PRCNAM= REMACP LOGINTIM= 16:24:38.21 PID= 0000002B PRCNAM= LATACP LOGINTIM= 16:24:43.18 PID= 0000004C PRCNAM= GODDARD LOGINTIM= 07:40:49.34 PID= 0000002D PRCNAM= SYMBIONT_0001 LOGINTIM= 16:25:47.54 PID= 0000002F PRCNAM= MCCORMICK LOGINTIM= 16:27:45.27
Exit 00000001
8002228C! ADDL R15,SP,SP EXIT
Successive address locations are displayed by pressing the Linefeed key two times. These instructions are the remainder of the setup and the call to printf. | |
A breakpoint at X1+8C (the current address) is set using the
| |
Program execution continues with the | |
Program execution stops at the new breakpoint 1, which is in the
print_line function. DELTA displays the breakpoint message and the
instruction at the new breakpoint. The | |
Program execution stops at breakpoint 1 in the print_line function.
Program execution is continued using a combination of the
| |
All current process login times are displayed. | |
Final exit status is displayed. | |
The DELTA EXIT command is entered to terminate the debugging session and leave DELTA. |
Note that your current PC must be in code generate by the XMACRO compiler for the register set to be valid.
Caution should be exercised with deposits to either %CRnn or %TSC, since these registers are used by SWIS and could cause XDELTA to fault or hang.