Specifications
Debugging a Device Driver
11.2 Using the OpenVMS AXP System-Code Debugger
Note that you can also use OpenVMS Debugger commands with the
DECwindows Motif interface.
• A character cell interface for terminals and workstations
When using this interface, you interact with the system-code debugger by
entering commands at a prompt. The sections in this chapter describe how to
use the system-code debugger with the character cell interface.
For more information about using the OpenVMS DECwindows Motif interface
and OpenVMS Debugger commands with the system-code debugger, see the
OpenVMS Debugger Manual.
11.2.2 Building a System Image to Be Debugged
1. Compile the sources you want to debug, and be sure to use the /DEBUG and
/NOOPT qualifers.
Note
Debugging optimized code is much more difficult and is not recommended
unless you know the AXP architecture well. The instructions are
reordered so much that single-stepping by source line will look like
you are randomly jumping all over the code. Also note that you cannot
access all variables. The system-code debugger reports that they are
optimized away.
2. Link your image using the the /DSF (debug symbol file) qualifier. Do not
use the /DEBUG qualifier, which is for debugging user programs. The /DSF
qualifier takes an optional filename argument similar to the /EXE qualifier.
For more information, see the OpenVMS Linker Utility Manual. If you specify
a name in the /EXE qualifier you will need one for the /DSF qualifier. For
example you would use the following command:
$ LINK/EXE=EXE$:MY_EXECLET/DSF=EXE$:MY_EXECLET OPTIONS_FILE/OPT
The .DSF and .EXE file names should be the same. Only the extensions will
be different, that is .DSF and .EXE.
The contents of the .EXE file should be exactly the same as if you had linked
without the /DSF qualifier. The .DSF file will be a small image containing
the image header and all the debug symbol tables for that image. It is not an
executable file, so you should not try to run it or load it.
3. Put the .EXE file on your target system.
4. Put the .DSF file on your host system, because when you use the system-code
debugger to debug code in your image, it will try to look for a .DSF file first
and then look for a .EXE file. The .DSF file is better because it has symbols
in it. Section 11.2.4 describes how to tell the system-code debugger where to
find your .DSF and .EXE files.
11.2.3 Setting Up the Target System for Connections
The target kernel is controlled by flags and devices specified when the system is
booted, XDELTA commands, a configuration file, and several sysgen parameters.
The following sections contain more information about these items.
11–3










