HP OpenVMS Delta/XDelta Debugger Manual


Previous Contents Index

For example, if you wanted to set breakpoint 4 at address 408, the command is as follows:


408,4;B[Return]

DELTA/XDELTA sets a breakpoint at the specified location and assigns it the specified breakpoint number.

Clearing Breakpoints

To clear a breakpoint, enter zero (0), followed by a comma, the number of the breakpoint to remove, a semicolon (;), the letter B, and then press the Return key. DELTA/XDELTA clears the specified breakpoint. For example, if you wanted to clear breakpoint 4, the command is as follows:


0,4;B[Return]

On VAX, when using XDELTA, do not clear breakpoint 1. If you do, any calls to INI$BRK in your program will not result in entry into XDELTA.

Setting Complex Breakpoints

On all platforms, a complex breakpoint completes one or more of the following actions:

To use the complex breakpoint, you must first create the string of DELTA commands you want executed. Then deposit those commands at a memory location with the Deposit ASCII String command (').

To set a complex breakpoint, use the following syntax:

addr-exp,n,display-addr-exp,cmd-string-addr;B


Example


 
;B 
1  00000690
2  00000699                  (1)
0,2;B                        (2)
;B 
1  00000690                  (3)
;P (4)

  1. Two breakpoints have already been set and are displayed. Using ;B, DELTA/XDELTA displays each breakpoint number and the address location of each breakpoint.
  2. Breakpoint 2 is cleared.
  3. Current breakpoints are displayed. Because breakpoint 2 has been cleared, DELTA/XDELTA displays just breakpoint 1.
  4. Program execution is continued using the ;P command.

Displaying Breakpoints in a Multithreaded Application

To support the debugging of multithreaded applications, DELTA has the capability of displaying a thread ID at a breakpoint. When DELTA reaches a breakpoint in a multithreaded application, DELTA displays the thread ID and stops the execution of all other threads. (When DELTA reaches a breakpoint in a single-threaded application, the display and behavior is the same as in the past; DELTA displays the address and stops program execution.)

In the following example, a breakpoint is set in a multithreaded application with 30000;B and is followed by the ;P (Proceed from Breakpoint) command. The breakpoint is taken. Because it is a multithreaded application, the thread ID is included in the display.


30000;B  ;P 
Brk 1 at 30000 on Thread 12 
00030000!  LDA  SP,#XFF80(SP) 
 
 


;C---Force System to Bugcheck and Crash (I64 and Alpha Only)

Force the system to bugcheck and crash.

Format

;C


Description

The ;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 (I64 and Alpha Only)

Dumps a region of memory.

Format

addr_exp, length ;D


Parameters

addr-exp

The starting address of the dump.

length

The length of bytes to dump.

Description

On I64 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;D                                                     (1)
 
Dump of 80000000 for 00000200 bytes                         (2)
 
00840008 80000200 0000241F 00E8401D  .@...$.......... : 80000000 (3)
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  .@(..$.......... : 80000140 
84000804 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       (4)
 
 

  1. The dump command is issued.
  2. The dump output summarizes the operation.
  3. The memory dump is displayed. The output is in the same format as the DCL DUMP command.
  4. The starting location of the dump is printed.

;E---Execute Command String

Executes a string of DELTA/XDELTA commands stored in memory.

Format

address-expression ;E


Arguments

address-expression

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.

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.

You can use the command strings provided with XDELTA to obtain the following information:


Example


 
7FFE1600,0;X      (1)
7FFE1600          (2)
X0;E              (3)
R0/00000001       (4)
R1/00000000
R2/00000000
 

  1. The address (7FFE1600) where an ASCII string is stored is placed into base register 0 using ;X.
  2. DELTA/XDELTA displays the value in X0.
  3. 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.
  4. DELTA/XDELTA executes the commands and displays the contents of R0, R1, and R2.

;G---Go

Continues program execution.

Format

address-expression ;G


Parameters

address-expression

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 (I64 and Alpha Only)

Specifies the display mode, either hardcopy terminal mode or DEC-CRT.

Format

;H


Description

The ;H command enables you to choose the display mode of DELTA/XDELTA output. You can display output either in hardcopy 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 (I64 and Alpha Only)

Lists information about the current main image and all shareable images that were activated, including those that were installed /RESIDENT.

Format

;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

Lists the names and virtual addresses of all loaded executive images.

Format

[sequence number];L


Argument

sequence number

On I64 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.

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.

The following examples illustrate the command on each platform.


Examples

The following I64 example shows the names, the starting and ending virtual addresses, and the sequence number for the specified loaded executive image. Images are split into image sections, showing the name and the base, link, and ending address of each respective section. In these examples, sequence number 24 selects the PROCESS_MANAGEMENT; sequence number selects SYS$PUBLIC_VECTORS; and sequence number 32 selects RMS.


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 
 

The following Alpha example shows the names, the starting and ending virtual addresses, and the sequence numbers for all the loaded executive images. Only one image, EXEC_INIT.EXE, was not split into image sections. For every image that was split into image sections, it also shows the name and the base and ending address of each section.


 
;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 
 

The following Alpha example illustrates the use of the sequence number with the ;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  80800800 
 
 

VAX example, showing the names and the starting and ending virtual addresses of the three executive images that are loaded in memory.


 
;L  
PRIMITIVE_IO.EXE              800EAA00  800EBC00
SYSTEM_SYNCHRONIZATION.EXE    800EBC00  800ED400
SYSTEM_PRIMITIVES.EXE         800ED400  800F1000
 


;M---Set All Processes Writable

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.


Format

n;M


Argument

n

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

The Set All Processes Writable command is useful for changing values in the running system.

Note

Use this activity very carefully during timesharing. 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.


Previous Next Contents Index