![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
OpenVMS Alpha System Analysis Tools Manual
If you want to proceed because you are done debugging this code, first cancel all the breakpoints and then enter the GO command. Notice, however, that you do not keep running but receive a message that you have stepped to line 147. This happens because the STEP command used earlier never completed. It was interrupted by the breakpoint on line 146. Note that the debugger remembers all step events and only removes them once they have completed.
The STEP/RETURN command, a different type of step command, single steps assembly code until it finds a return instruction. This command is useful if you want to see the return value for the routine, which is done here by examining the R0 register. For more information about using other STEP command qualifiers, see the OpenVMS Debugger Manual.
After you finish the SCD session, enter the GO command to leave this module. You will encounter another INI$BRK breakpoint at the end of EXEC_INIT. An error message indicating there are no source lines for address 80002010 is displayed, because debug information on this image or module is not available. Also notice that there is no message in the OUT display for this event. That is because INI$BRKs are special breakpoints that are handled as SS$_DEBUG signals. They are a method for the system code to break into the debugger and there is no real breakpoint in the code.
Enter the SHOW IMAGE command. You will see more images displayed as the boot path has progressed further. Finally, enter GO, allowing the target system to boot completely, because there are no more breakpoints in the boot path. The debugger will wait for another event to occur.
Chapter 9
|
Because you are analyzing a snapshot of the system, it is not as vital to use unoptimized code as it is with the system code debugger. But note that you cannot access all variables. SDD may report that they are optimized away. |
$ LINK/EXE=EXE$:MY_EXECLET/DSF=EXE$:MY_EXECLET OPTIONS_FILE/OPT |
The only requirement for the test system is that the .DSF file matching the .EXE file that causes the crash is available on the build system.
There are no other steps necessary in the setup of the test system. With the system image copied to the test system, it can be booted in any way necessary to produce the system crash. Since SDD can analyze most system crash dumps, any system can be used, from a standalone system to a member of a production cluster.
It is assumed that the test system has a dump file large enough for the system dump to be recorded. Any dump style may be used (full or selective, compressed or uncompressed). A properly AUTOGENed system will meet these requirements. |
To set up the build system, you need access to all system images and drivers that were loaded on the test system. You should have access to a source listings kit or a copy of the following directories:
SYS$LOADABLE_IMAGES: SYS$LIBRARY: SYS$MESSAGE: |
You need all the .EXE files in those directories. The .DSF files are available with the OpenVMS Alpha source listings kit.
Optionally, you need access to the source files for the images to be debugged. SDD will look for the source files in the directory where they were compiled. You must use the SET SOURCE command to point SDD to the location of the source code files if they are not in the directories used when the image was built. For an example of the SET SOURCE command, see Section 9.9.
Before you can analyze a system dump with SDD, you must set up the logical name DBGHK$IMAGE_PATH, which must be set up as a search list to the area where the system images or .DSF files are kept. For example, if the copies are in the following directories:
DEVICE:[SYS$LDR] DEVICE:[SYSLIB] DEVICE:[SYSMSG] |
you would define DBGHK$IMAGE_PATH as follows:
$ define dbghk$image_path DEVICE:[SYS$LDR],DEVICE:[SYSLIB],DEVICE:[SYSMSG] |
This works well for analyzing a system dump using all the images normally loaded on a given system. However, you might be using SDD to analyze new code either in an execlet or a new driver. Because that image is most likely in your default directory, you must define the logical name as follows:
$ define dbghk$image_path [],DEVICE:[SYS$LDR],DEVICE:[SYSLIB],DEVICE:[SYSMSG] |
If SDD cannot find one of the images through this search path, a warning message is displayed. SDD will continue initialization as long as it finds at least one image. If SDD cannot find the SYS$BASE_IMAGE file, which is the OpenVMS Alpha operating system's main image file, an error message is displayed and the debugger exits.
If and when this happens, check the directory for the image files and
compare it to what was loaded on the test system.
9.5 Starting the System Dump Debugger
To start SDD on the build system, enter the following command.
$ DEBUG/KEEP |
SDD displays the DBG> prompt. With the DBGHK$IMAGE_PATH logical name defined, you can invoke the ANALYZE/CRASH_DUMP command and optional qualifier /IMAGE_PATH.
To use the ANALYZE/CRASH_DUMP command and optional qualifier (/IMAGE_PATH) to analyze the dump in file <file-name> enter the following command:
DBG> ANALYZE/CRASH_DUMP file-name |
The /IMAGE_PATH qualifier is optional. If you do not use this qualifier, SDD uses the DBGHK$IMAGE_PATH logical name as the default. The /IMAGE_PATH qualifier is a quick way to change the logical name. However, when you use it, you cannot specify a search list. You can use only a logical name or a device and directory, although the logical name can be a search list.
Usually, SDD obtains the source 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.
9.6 Summary of System Dump Debugger Commands
Only a subset of OpenVMS debugger commands can be used in SDD. The following are a few examples of commands that you can use in SDD:
Examples of commands that cannot be used in SDD are as follows:
You can also use the OpenVMS debugger command SDA to examine the system
dump with System Dump Analyzer semantics. This command, which is not
available when debugging user programs, is described in the next
section.
9.7 Using System Dump Analyzer Commands
Once a dump file has been opened, you can use the commands listed in the previous section to examine the system dump. You can also use some System Dump Analyzer (SDA) commands, such as SHOW SUMMARY and SHOW DEVICE. This feature allows the system programmer to take advantage of the strengths of both the OpenVMS Debugger and SDA to examine the system dump and to debug system programs such as device drivers, without having to invoke both the OpenVMS debugger and SDA separately.
To obtain access to SDA commands, you simply type "SDA" at the OpenVMS Debugger prompt ("DBG>") at any time after the dump file has been opened. SDA initializes itself and then outputs the "SDA>" prompt. Enter SDA commands as required. (See Chapter 4 for more information.) To return to the OpenVMS Debugger, you enter "EXIT" at the "SDA>" prompt. Optionally, you may invoke SDA to perform a single command and then return immediately to the OpenVMS Debugger, as in the following example:
DBG> SDA SHOW SUMMARY |
SDA may be reentered at any time, with or without the optional SDA command. Once SDA has been initialized, the SDA> prompt is output more quickly on subsequent occasions.
Note that there are some limitations on the use of SDA from within SDD:
If the need arises to switch between processes or CPUs in the system
dump, then you must invoke SDA separately using the DCL command
ANALYZE/CRASH_DUMP.
9.8 Limitations of the System Dump Debugger
SDD provides a narrow window into the context of the system that was current at the time that the system crashed (stack, process, CPU, and so on). It does not provide full access to every part of the system as is provided by SDA. However, it does provide a view of the failed system using the semantics of the OpenVMS debugger---source correlation and display, call frame traversal, examination of variables by name, language constructs, and so on.
SDD therefore provides an additional approach to analyzing system dumps that is difficult to realize with SDA, often allowing quicker resolution of system crashes than is possible with SDA alone. When SDD cannot provide the needed data from the system dump, you should use SDA instead.
Previous | Next | Contents | Index |