Updated: 11 December 1998 |
OpenVMS Delta/XDelta Debugger Manual
Previous | Contents | Index |
Displaying Breakpoints in a Multithreaded Application
To support the debugging of multithreaded applications, DELTA has the capability of displaying a thread ID at a breakpoint. When DELTA reaches a breakpoint in a multithreaded application, DELTA displays the thread ID and stops the execution of all other threads. (When DELTA reaches a breakpoint in a single-threaded application, the display and behavior is the same as in the past; DELTA displays the address and stops program execution.)
In the following example, a breakpoint is set in a multithreaded application with 30000;B and is followed by the ;P (Proceed from Breakpoint) command. The breakpoint is taken. Because it is a multithreaded application, the thread ID is included in the display.
30000;B ;P Brk 1 at 30000 on Thread 12 00030000! LDA SP,#XFF80(SP) |
Continue program execution following a breakpoint.
;P
The Proceed from Breakpoint command continues program execution at the address contained in the PC of the program. Program execution continues until the next breakpoint or until program completion.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.
The following example applies only to OpenVMS VAX.
;B 2 00000699 (1) ;P (2) 2 BRK AT 00000699 00000699/BSBB 000006A2 (3)
The following example applies only to OpenVMS Alpha.
;B 1 00030010 (1) ;P (2) Brk 1 at 00030010 00030010! STQ R26,#X0008(SP) (3)
Continues program execution.
address-expression ;G
address-expression
The address at which to continue program execution.
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.
6A2;GProgram execution is started at address 6A2.
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.
S
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 VAX, if the instruction being executed is a BSBB, BSBW, JSB, CALLG, or CALLS instruction, Step moves to the subroutine called by these instructions and displays the first instruction within the subroutine.
On Alpha, if the instruction being executed is a JSR or BSR 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.On Alpha and VAX, in general, you 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.
The following example applies only to OpenVMS VAX.
00000690/CMPL R0,#000009A8 S (1) 00000697/BEQL 0000069D S (2) 00000699/BSBB 000006A2 S (3) 000006A2/PUSHL R2 (4)
- Step program execution is started at address 690. The instruction at 690 is executed and the next instruction is displayed. Step execution is continued using S.
- At address 697, there is a branch instruction to the instruction at address 69D. However, because the condition (BEQL) is not met, program execution continues at the next instruction. The next S command is executed.
- At address 699, there is a branch instruction to the instruction at address 6A2, a subroutine. The next S command is executed.
- Program execution moves to the subroutine.
The following example applies only to OpenVMS Alpha.
0003003C! BLBC R0,#X000006 S (1) 00030040! LDQ R16,#X0050(R2) S (2) 00030044! BIS R31,R31,R17 S (3) 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 S command.
- 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 S command causes the LDQ instruction to be executed.
- The instruction at address 30044 is displayed. The S command is executed.
Executes one instruction, steps over a subroutine by executing it, and displays the instruction to which the subroutine returns control.
O
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 VAX, the subroutine call instructions are BSBB, BSBW, JSB, CALLG, and CALLS.
On Alpha, the subroutine call instructions are JSR and BSR.
On Alpha and VAX, 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:
STEPOVER BRK AT nnnnnnnn instructionThe 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 VAX, the CPU ID is displayed as a 2-digit hexadecimal number.
On Alpha, the CPU ID is displayed as a decimal number with no leading zeros.
The following example applies only to OpenVMS VAX.
6D5;B (1) ;P (2) 1 BRK AT 000006D5 000006D5/CALLS #0C,@#7FFEDE00 ;P (3) PID= 0006 LOGINTIME= 12:50:29.45 2 BRK AT 00000699 00000699/BSBB 000006A2 ;P (4) 1 BRK AT 000006D5 000006D5/CALLS #0C,@#7FFEDE00 ;P (5) PID= 0007 LOGINTIME= 12:50:37.08 2 BRK AT 00000699 00000699/BSBB 000006A2 O (6) 1 BRK AT 000006D5 000006D5/CALLS #0C,@#7FFEDE00 ;P (7) PID= 0008 LOGINTIME= 12:50:45.64 STEPOVER BRK AT 0000069B (8) 0000069B/BRB X1+047A
- One breakpoint has been set at address 699 in the main routine. A simple breakpoint is set at 6D5 using ;B. This breakpoint is in a subroutine.
- Program execution continues using ;P.
- Program execution stops at breakpoint 1, which is in the subroutine. DELTA/XDELTA displays the breakpoint message and the instruction at the new breakpoint. Program execution continues using ;P.
- The subroutine completes and displays some output. Program execution continues until breakpoint 2. DELTA/XDELTA displays the breakpoint message and the breakpoint 2 instruction. Program execution continues with the ;P command.
- Program execution stops at breakpoint 1. Program execution continues with the ;P command. The subroutine completes execution and displays the output.
- Program execution stops at breakpoint 2. The subroutine is stepped over to the next instruction using the O command.
- Program execution stops at breakpoint 1 in the subroutine. Program execution continues using the ;P command.
- The subroutine completes execution and displays output. DELTA/XDELTA displays a STEPOVER break message that states the O command has been completed, returning control at address 69B.
The following example applies only to OpenVMS Alpha.
30040;B (1) 30070;B (2) ;B 1 00030040 2 00030070 ;P (3) Brk 1 at 00030040 00030040! LDA R27,#XFFC8(R2) O (4) 00030044! BSR R26,#X00000A O (5) Brk 2 at 00030070 00030070! LDA SP,#XFFD0(SP) ;P (6) Step-over at 30048 00030048! LDQ R26,#X0048(R2) S (7) 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 ;B command.
- Program execution continues using ;P.
- Program execution stops at breakpoint 1. DELTA/XDELTA displays the breakpoint message and the instruction at the breakpoint address. The O command is used to single-step (DELTA/XDELTA recognizes that this is not a call instruction and turns it into a single-step instead).
- The next instruction is a subroutine call (BSR). The subroutine is stepped over using the O command.
- 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 ;P command.
- The subroutine completes execution. DELTA/XDELTA displays a step-over break message that indicates that the O command has been completed, returning control at address 30048.
Deposits the ASCII string at the current address.
'string'
string
The string of characters to be deposited.
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.
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).
Executes a string of DELTA/XDELTA commands stored in memory.
address-expression ;E
address-expression
The address of the string of DELTA/XDELTA commands to execute.
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 VAX, the addresses of these command strings are stored in base registers XE and XF. The string addressed by XE displays the physical page number (PFN) database for the PFN in X0. The string addressed by XF copies the PFN in R0 to base register X0. It then displays the PFN database for that PFN.
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.
On Alpha and VAX, you can use the command strings provided with XDELTA to obtain the following information:
- 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 VAX, the virtual block number in the process swap image, the block to which the page's entry in the SWPVBN array points
- On Alpha, the virtual page number in process swap image, the collection of blocks containing the page as pointed to by the PFN database
7FFE1600,0;X (1) 7FFE1600 (2) X0;E (3) R0/00000001 (4) R1/00000000 R2/00000000
- The address (7FFE1600) where an ASCII string is stored is placed into base register 0 using ;X.
- 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 ;E.
- DELTA/XDELTA executes the commands and displays the contents of R0, R1, and R2.
Places an address in a base register.
address-expression,n[,y];X
address-expression
The address to place in the base register.n
The number of the base register.y
On Alpha, a parameter for modifying the default offset of 1000016. The valid range is 1 to FFFFFFFF.
On VAX, to place an address in a base register, enter an expression followed by a comma (,), a number from 0 to F16, a semicolon (;), and the letter X.
On Alpha, to place an address in a base register, enter an expression followed by a comma (,), or a number from 0 to 1510, optionally, a number from 1 to FFFFFFFF, a semicolon (;), and the letter X.
On Alpha and VAX, 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.
For example, the following command places the address 402 in base register 0. DELTA/XDELTA then displays the value in the base register to verify it.
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 VAX, the default offset is 200016 bytes. It cannot be modified.
On Alpha, the default offset is 1000016, which can be modified.
The following example applies only to OpenVMS VAX.
00000664/CLRQ -(SP) 200,1;X (1) 00000200 (2) X1 490!CMPL R0,#000009A8 (3) X1 499!BSBB X1+04A2 (4)
- The base address of the program (determined from the map file) is virtual address 200. The base address is stored in base register 1 with ;X.
- DELTA/XDELTA displays the value in base register 1 just loaded, 200.
- The instruction at offset 490 is displayed in instruction mode using the ! command. The address reference is X1+490 (the + sign is implied when not specified). DELTA/XDELTA displays the instruction at address X1+490.
- The instruction at offset 499 is displayed. This instruction is a branch instruction. DELTA/XDELTA displays the address of the branch in offset notation.
The following example applies only to OpenVMS Alpha.
30000,0;X (1) 00030000 30070,1,200;X (2) 00030070 ;X (3) 0 00030000 1 00030070 00000200 S (4) X0+00000004! BIS R31,R31,R18 x1+10! STQ FP,#X0020(SP) (5)
Previous Next Contents Index
Copyright © Compaq Computer Corporation 1998. All rights reserved.
Legal4540PRO_004.HTML