STREAMS/UX for the HP 9000 Reference Manual
174
Debugging STREAMS/UX Modules and Drivers
Using adb
Using adb
This section describes how to use adb on core dumps obtained following a
system crash. See “Generating and Retrieving System Core Dumps” for
information on how these dumps are obtained. adb can also be used to
examine a system that is currently running.
See the adb(1) man page or ADB Tutorial for more information.
Invoking adb
When using adb on a system core dump, you must use the “-k” option. This
option will tell adb to treat the core dump as a system core dump instead of a
user process core dump, which is organized differently. For example, to call
adb on the dump pair vmcore.1 and vmunix.1, perform the following:
adb -k vmunix.1 vmcore.1
When using adb on a running HP-UX system, you also use the “-k” option,
and use /stand/vmunix as the object file and /dev/mem as the core file:
adb -k /stand/vmunix /dev/mem
You will probably need to be superuser to access /dev/mem. Because you
are examining a running (and continuously changing) system, adb will not
be able to set you up in any specific process context, but you will be able to
examine kernel global variables.
Context on Entry to adb
adb maintains a set of registers corresponding to the registers of the
machine. The adb command $r will print out the values of these registers.
When adb is invoked on a system core with the -k option, it sets these
registers to the values of the machine registers at the time the system core
dump was taken. These register values are not the values the registers
contained at the point the panic or trap occurred. Instead, they are the values
the registers contained at the time the kernel started dumping a copy of
physical memory to the swap area. How to use these “dump time” register
values to determine the state of the registers at the time the trap or panic