HP-UX Reference (11i v3 07/02) - 1M System Administration Commands A-M (vol 3)

k
kwdb(1M) kwdb(1M)
-write Enable writing into kernel file and memory.
For remote debugging, kwdb has to be invoked with a local copy of the kernel file. Invoking
kwdb with
the
-q4 option and a crash dump directory name as an argument starts
kwdb for crash dump analysis in
q4 mode.
Invoking kwdb with the -q4 option and kernel file name followed by a remote system:portnumber starts
kwdb for analyzing crash dump on a remote system.
Invoking kwdb with /dev/mem or /dev/kmem as an argument starts
kwdb for analyzing the local run-
ning system.
Commands
This manpage describes the most commonly used KWDB commands for kernel debugging.
Use the
kwdb help command to see a complete list of commands, their explanations, and examples.
KWDB allows partial commands to be entered as long as the abbreviations are not ambiguous. For exam-
ple, the following pairs of commands are equivalent:
(kwdb)kwdb -help
(kwdb)kwdb -he
(kwdb) break function_name
(kwdb) b function_name
(kwdb) info breakpoints
(kwdb) i b
All address arguments are virtual addresses unless specified otherwise.
Getting Help
help List the classes of commands.
help command Describe the specified kwdb command.
Stopping KWDB
quit Exit KWDB. Also typing q or EOF (CTRL- D) causes KWDB to quit.
CTRL-C (INTERRUPT) Terminate the current command, or interrupt the target kernel.
detach Release the target kernel from KWDB control and allow it to continue.
kill Release the target kernel from KWDB control and reboot.
Attaching and Debugging Targets
Use the target command to debug a remote system. The target system must be booted with appropriate
flags. The kernel debugger can be booted in either "boot-wait" mode or "boot-nowait" mode. In "boot-wait"
mode, the kernel debugger will attach before the rest of the kernel boots. In "boot-nowait" mode, the
debugger will attach after the kernel has fully booted.
After the target is specified, use the attach command to start a debugging session.
The target command has the following syntaxes:
target console lantron_name:20nn
Debug using the on-console debugger and kwdb via the remote console. lantron_name specifies the
name of the terminal server such Lantronix hardware which is connected to the target system. nn is
the port number for the remote console.
target ia64_kern comm_server[:47001]
Set up LAN-based debugging through the KWDB server on the communication server, comm_server,
for Itanium-based architecture.
target serial devicefile
Set up RS-232-based debugging for the specified serial device file, devicefile.
target lantron_serial lantron_name :30nn
Set up Lantron serial debugging on the terminal server, lantron_name. nn is the serial port on the
target system.
410 Hewlett-Packard Company 2 HP-UX 11i Version 3: February 2007