Specifications

Debugging a Device Driver
11.4 Troubleshooting Network Failures
If the debugger only has access to the .EXE file, this means no symbols at all
for images with no symbol vectors. For .DSF files, the current image symbols
for any set module are defined. (You can tell if you have the .DSF or .EXE
by using the SHOW MODULE command—if there are no modules you have
the .EXE). This includes any symbols in the SYS$BASE_IMAGE.EXE symbol
vector for which the code or data resides in the current image. However,
the user cannot access a symbol that is part of the SYS$BASE_IMAGE.EXE
symbol vector that resides in another image. For example, if you are in
one image and you want to set a break point in a cross-image routine from
another image, you do not have access to the symbol. Of course, if you know
which image it is defined in, you can just do a SET IMAGE, SET MODULE
/ALL and then a SET BREAK.
There is a debugger workaround for this problem. The debugger and the
system-code debugger let you use the SET MODULE command on an image
by prefixing the image name with SHARE$ (SHARE$SYS$BASE_IMAGE for
example). This treats that image as a module which is part of the current
image. In the previous figure, think of it as another module in the module list
for an image. Note, however, that only the symbols for the symbol vector are
loaded. None of the symbols for the modules of the SHARE$xxx image are
loaded. Therefore, this command is only useful for base images.
So in other words, by doing SET MODULE SHARE$SYS$BASE_IMAGE, the
debugger gives you access to all cross-image symbols for the VMS Executive.
Stale Data From the Symbol Vector
When an OpenVMS Executive Based Image is loaded, the values in the
symbol vectors are only correct for information that resides in that based
image. For all symbols that are defined in the separately loaded images, it
contains a pointer to a placeholder location. For routine symbols this is a
routine that just returns an image not loaded failure code. A symbol vector
entry is fixed to contain the real symbol address when the image in which the
data resides is loaded.
Therefore, if the user does a SET IMAGE to a base image before the all the
symbol entries are corrected, it will get the placeholder value for those
symbols. Then once the image containing the real data is loaded, the
debugger will still have the placeholder value. This means the user is looking
at stale data. One solution to this is to make sure to do a CANCEL IMAGE
and SET IMAGE on the based image in order to get the most up to date
symbol vector loaded into memory.
The CANCEL IMAGE/SET IMAGE combination does not currently work
for SYS$BASE_IMAGE because it is the main image and DEBUG does
not allow you to CANCEL the main image. Therefore, if you connect to
the target system early in the boot process, you will have stale data as
part of the SYS$BASE_IMAGE symbol table. However, the SET MODULE
SHARE$xxx command always re-loads the information from the symbol
vector. So to get around this problem you could SET IMAGE to an image
other than SYS$BASE_IMAGE and then do use CANCEL MODULE
SHARE$SYS$BASE_IMAGE and SET MODULE SHARE$SYS$BASE_
IMAGE to do the same thing. The only other solution is to always connect to
the target system once all images are loaded which define the real data for
values in the symbol vectors. You could also enter the following commands,
and you would get the latest values from in the symbol vector.
11–14