Specifications

Debugging a Device Driver
11.4 Troubleshooting Network Failures
SET IMAGE EXEC_INIT
SET MODULE/ALL
SET MODULE SHARE$SYS$BASE_IMAGE
Problems with SYS$BASE_IMAGE.DSF
For those that have access to the SYS$BASE_IMAGE.DSF file, there may
be another complication with accessing symbols from the symbol vector. The
problem is that the module SYSTEM_ROUTINES contains the placeholder
values for each symbol in the symbol vector. So, if SYSTEM_ROUTINES is
the currently set module (which is the case if you are sitting at the INI$BRK
break point) then the debugger will have the placeholder value of the symbol
as well as the value in the symbol vector. You can see what values are loaded
with the SHOW SYMBOL/ADDRESS command. The symbol vector version
should be marked with (global), the local one is not.
To set a break point at the correct code address for a routine when in this
state, use the SHOW SYMBOL/ADDRESS command on the routine symbol
name. If the global and local values for the code address are the same, then
the image with the routine has not been loaded yet. If not, set a break point
at the code address for the global symbol.
11.4.2 Sample System-Code Debugging Session
This section provides a sample session that shows the use of some DEBUG
commands as they apply to the system-code debugger. The examples in this
session show how to work with C code that has been linked into the SYSTEM_
DEBUG execlet. It is called as an initialization routine for SYSTEM_DEBUG.
To reproduce this sample session, you need access to the SYSTEM_DEBUG.DSF
matching the SYSTEM_DEBUG.EXE file on your target system and to the source
file C_TEST_ROUTINES.C, which is available in SYS$EXAMPLES. The target
system is booted with the command bootflags 0, 8004 DKA0, ESA0, so it stops at
an initial breakpoint.
The example begins by invoking the system-code debugger’s character cell
interface.
Example 11–1 Invoking the System-Code Debugger
$ define dbg$decw$display " " ! Don’t use Motif version
$ debug/keep
OpenVMS Alpha AXP DEBUG Version T2.0-001
DBG>
Use the CONNECT command to connect to the target system. In this example, a
password is not set up, and the example uses the logical DBGHK$IMAGE_PATH
for the image path; those qualifiers are not being used. You may need to use
them.
When you have connected to the target system, the DEBUG prompt is displayed.
Enter the SHOW IMAGE command to see what has been loaded. Because you
are reaching a breakpoint early in the boot process, there are very few images.
See Example 11–2. Notice that SYS$BASE_IMAGE has an asterisk next to it.
This is the currently set image and all symbols currently loaded in the debugger
come from that image.
11–15