Specifications

Debugging a Device Driver
11.2 Using the OpenVMS AXP System-Code Debugger
DEVICE:[SYS$LDR]
DEVICE:[SYSLIB]
DEVICE:[SYS$MSG]
you would define DBGHK$IMAGE_PATH as follows:
$ define dbghk$image_path DEVICE:[SYS$LDR],DEVICE:[SYSLIB],DEVICE:[SYS$MSG]
This works well for debugging using all the images normally loaded on a given
system. However, you might be using the debugger to test new code in an execlet
or a new driver and might want to debug that new code. Because that image is
most likely in your default directory, you must define the logical as follows:
$ define dbghk$image_path [],DEVICE:[SYS$LDR],DEVICE:[SYSLIB],DEVICE:[SYS$MSG]
If the system-code debugger cannot find one of the images through this search
path, a warning message is displayed. The system-code debugger will continue
initialization as long as it finds at least one image. If the system-code debugger
cannot find the SYS$BASE_IMAGE file, which is the OpenVMS AXP operating
system’s main image file, an error message is displayed and the debugger exits.
Check the directory for the image files and compare it to what is loaded on the
target system.
11.2.5 Starting the System-Code Debugger
To start the system-code debugger on the host side, enter the following command:
$ DEBUG/KEEP
The system-code debugger displays the DBG> prompt. With the
DBGHK$IMAGE_PATH logical defined, you can invoke the CONNECT command
and optional qualifiers /PASSWORD and /IMAGE_PATH.
To use the CONNECT command and optional qualifiers (/PASSWORD and
/IMAGE_PATH) to connect to the node with name <node-name> enter the
following command:
DBG> CONNECT %NODE_NAME node-name /PASSWORD="password"
If a password has been set up on the target system, you must use the
/PASSWORD qualifier. If a password is not specified, a zero length string is
passed to the target system as the password.
The /IMAGE_PATH qualifier is also optional. If you do not use this qualifier, the
system-code debugger uses the DBGHK$IMAGE_PATH logical as the default.
The /IMAGE_PATH qualifier is a quick way to change the logical. However, when
you use it, you cannot specify a search list. You can use only a logical or a device
and directory, although the new logical could be a search list.
Usually, the system-code debugger gets the file name from the object file. This is
put there by the compiler when the source is compiled with the /DEBUG qualifier.
The SET SOURCE command can take a list of paths as a parameter. It treats
them as a search list.
11.2.6 Summary of OpenVMS Debugger Commands
The following OpenVMS Debugger commands can also be used with the system-
code debugger:
DISPLAY
EXPAND
EXTRACT
MOVE
11–8