Previous | Contents | Index |
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.
The callout list following the example provides details for this example segment.
Example B-6 DELTA Debugging Session Example on Alpha - Part 3 |
---|
[Linefeed] (1) X1+00000088! LDL R18,#X0010(FP) [Linefeed] X1+0000008C! JSR R26,(R26) .;B (2) ;B 1 0003008C 2 000301AC ;P (3) Brk 1 at 0003008C (4) 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 (5) 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 (6) Exit 00000001 (7) 8002228C! ADDL R15,SP,SP EXIT (8) |
This appendix provides an example of how you would use DELTA to debug a program executing on OpenVMS VAX. The example program, named LOGINTIM, uses the system service SYS$GETJPI to obtain the login times of each process. To run the example program without error, you need WORLD privilege.
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. |
This appendix consists of two sections:
This section shows the listing files for the example program, LOGINTIM, in two parts:
See Section C.2 for the corresponding sample debugging session using this program.
C.1.1 Source Listing for VAX Debugging Example
The .LIS file for the DELTA debugging example on OpenVMS VAX is shown
in Example C-1. Only the offsets and source code are shown.
Example C-1 Program for Getting LOGINTIMs |
---|
0000 1 ;++ 0000 2 ; This sample program uses the wildcard feature of GETJPI to get the 0000 3 ; LOGINTIM for each active process. It outputs the PID and LOGINTIM 0000 4 ; for each and exits when there are NOMOREPROCs. 0000 5 ;-- 0000 6 0000 7 ; 0000 8 ; Data areas. 0000 9 ; 0000 10 DEVNAM: .ASCID /SYS$OUTPUT/ ;Output device specifier 000E 0012 11 0012 12 CHAN: .LONG 0 ;Assigned output channel 0016 13 0016 14 ITMLST: ;Item list for GETJPI call 0016 15 .WORD 8 ; Byte length of output buffer 0018 16 .WORD JPI$_LOGINTIM ; Specify LOGINTIM item code 001A 17 .ADDRESS TIME ; Address of output buffer 001E 18 .LONG 0 ; Not interested in return length 0022 19 .LONG 0 ;Item list terminator 0026 20 0026 21 TIME: .QUAD 0 ;Buffer to hold LOGINTIM 002E 22 002E 23 OUTLEN: .LONG 0 ;FAO buffer length 0032 24 OUTBUF: .LONG 1024 ;FAO buffer descriptor 0036 25 .ADDRESS BUF 003A 26 BUF: .BLKB 1024 ;FAO buffer 043A 27 043A 28 CTRSTR: .ASCID *!/!_PID= !XW!_LOGINTIME= !%T* ;FAO control string 0448 0454 045E 29 045E 30 PIDADR: .LONG -1 ;Wildcard PID control longword 0462 31 0462 32 ;++ 0462 33 ; Start of program. 0462 34 ;-- 0462 35 S: .WORD 0 ;Entry mask 0464 36 $ASSIGN_S DEVNAM,CHAN ;Assign output channel 0475 37 MOVAB TIME,R2 ;Load pointer to LOGINTIM 047A 38 ; output buffer 047A 39 LOOP: $GETJPI_S ITMLST=ITMLST,-;Get LOGINTIM for a process 047A 40 PIDADR=PIDADR 0490 41 CMPL R0,#SS$_NOMOREPROC ;Are we done? 0497 42 BEQL 5$ ;If EQL yes 0499 43 BSBB GOT_IT ;Process data for this process 049B 44 BRB LOOP ;Look for another process 049D 45 049D 46 5$: MOVZBL #SS$_NORMAL,R0 ;Set successful completion code 04A1 47 RET ;Return, no more processes 04A2 48 04A2 49 GOT_IT: $FAO_S CTRSTR,- ;Format the output data 04A2 50 OUTLEN,- 04A2 51 OUTBUF,- 04A2 52 PIDADR,R2 04B9 53 $QIOW_S CHAN=CHAN,- ;Output to SYS$OUTPUT 04B9 54 FUNC=#IO$_WRITEVBLK,- 04B9 55 P1=BUF,- 04B9 56 P2=OUTLEN 04DC 57 RSB ;Done with this process data 04DD 58 04DD 59 .END S |
The .MAP file is shown in Example C-2. Only the Program Section Synopsis with the PSECT, MODULE, base address, end address, and length are listed.
Example C-2 LOGINTIM Program .Map File |
---|
+--------------------------+ ! Program Section Synopsis ! +--------------------------+ Psect Name Module Name Base End Length ---------- ----------- ---- --- ------ . BLANK . 00000200 000006E2 000004E3 ( 1251.) .MAIN. 00000200 000006E2 000004E3 ( 1251.) |
C.2 Example DELTA Debugging Session on VAX
The DELTA debugging session on OpenVMS VAX for the sample program is
shown in the four example segments that follow.
C.2.1 DELTA Debugging Session Example on VAX - Part 1
In the first part of the example session, DELTA is enabled and the LOGINTM program is invoked. The example shows version information displayed by DELTA and the use of the ;B and ;P commands.
The callout list following the example provides details for this example segment.
Example C-3 DELTA Debugging Session Example on VAX - Part 1 |
---|
$ DEFINE LIB$debugging SYS$LIBRARY:DELTA (1) $ RUN/debugging LOGINTIM (2) DELTA Version 6.0 00000664/CLRQ -(SP) 200,1;X (3) 00000200 (4) X1 490!CMPL R0,#000009A8 .;B (5) X1 499!BSBB X1+04A2 .;B (6) |
In the second part of the example session, program execution begins. DELTA halts at the first breakpoint and displays information. User interaction allows DELTA to continue to the next breakpoint.
The callout list following the example provides details for this example segment.
Example C-4 DELTA Debugging Session Example on VAX - Part 2 |
---|
;P (1) 1 BRK AT 00000690 X1+0490/CMPL R0,#000009A8 R0/00000001 ;P (2) 2 BRK AT 00000699 X1+499/BSBB X1+04A2 O (3) PID= 0000 LOGINTIME= 00:00:00.00 (4) X1+049B/BRB X1+047A ;P (5) 1 BRK AT 00000690 X1+0490/CMPL R0,#000009A8 R0/00000001 ;P (6) 2 BRK AT 00000699 X1+0499/BSBB X1+04A2 O (7) PID= 0001 LOGINTIME= 00:00:00.00 X1+049B/BRB X1+047A ;P 1 BRK AT 00000690 X1+0490/CMPL R0,#000009A8 (8) ;B (9) 1 00000690 2 00000699 (10) |
In the third part of the example session, the first breakpoint is cleared, then all breakpoints are listed. The program continues until the next breakpoint is encountered, and the user sets a new breakpoint.
The callout list following the example provides details for this example segment.
Example C-5 DELTA Debugging Session Example on VAX - Part 3 |
---|
0,1;B (1) ;B (2) 2 00000699 (3) ;P (4) 2 BRK AT 00000699 X1+0499/BSBB X1+04A2 O PID= 0004 LOGINTIME= 12:50:20.40 X1+049B/BRB X1+047A ;P (5) 2 BRK AT 00000699 X1+0499/BSBB X1+04A2 ;P PID= 0005 LOGINTIME= 12:50:25.61 (6) 2 BRK AT 00000699 X1+0499/BSBB X1+04A2 X1 4B9!CLRQ -(SP) (7) [Linefeed] (8) X1+04BB/CLRQ -(SP) [Linefeed] X1+04BD/PUSHL X1+002E [Linefeed] X1+04C1/PUSHAL X1+003A [Linefeed] X1+04C5/CLRQ -(SP) [Linefeed] X1+04C7/PUSHL #00 [Linefeed] X1+04C9/MOVZWL #0030;-(SP) [Linefeed] X1+04CE/MOVZWL X1+0012,-(SP) [Linefeed] X1+04D3/PUSHL #00 [Linefeed] X1+04D5/CALLS #0C,@#7FFEDE00 .;B (9) ;B (10) 1 000006D5 2 00000699 |
In the final part of the example session, program execution continues and stops at the new breakpoint set in the previous example segment. DELTA executes the subroutine where the breakpoint was encountered and displays the output. The next breakpoint is reached and the use enters the ;O command to step over the subroutine. When there are no more breakpoints, the program completes and final exit status is displayed.
The callout list following the example provides details for this example segment.
Example C-6 DELTA Debugging Session Example on VAX - Part 4 |
---|
;P (1) 1 BRK AT 000006D5 X1+04D5/CALLS #0C,@#7FFEDE00 ;P (2) PID= 0006 LOGINTIME= 12:50:29.45 2 BRK AT 00000699 X1+0499/BSBB X1+04A2 ;P (3) 1 BRK AT 000006D5 X1+04D5/CALLS #0C,@#7FFEDE00 ;P (4) PID= 0007 LOGINTIME= 12:50:37.08 2 BRK AT 00000699 X1+0499/BSBB X1+04A2 O (5) 1 BRK AT 000006D5 X1+04D5/CALLS #0C,@#7FFEDE00 ;P (6) PID= 0008 LOGINTIME= 12:50:45.64 STEPOVER BRK AT 0000069B (7) X1+049B/BRB X1+047A ;B (8) 1 000006D5 2 00000699 (9) 0,2;B (10) 0,1;B (11) ;B (12) ;P (13) PID= 0009 LOGINTIME= 12:51:22.51 PID= 000A LOGINTIME= 12:51:30.26 PID= 000B LOGINTIME= 12:51:36.21 PID= 000C LOGINTIME= 12:51:58.86 (14) EXIT 00000001 (15) 80187E7E/POPR #03 EXIT (16) |
Index | Contents |