124 lines
4.0 KiB
Groff
124 lines
4.0 KiB
Groff
|
.\" Copyright (c) 1986, 1991 Regents of the University of California.
|
||
|
.\" All rights reserved.
|
||
|
.\"
|
||
|
.\" Redistribution and use in source and binary forms, with or without
|
||
|
.\" modification, are permitted provided that the following conditions
|
||
|
.\" are met:
|
||
|
.\" 1. Redistributions of source code must retain the above copyright
|
||
|
.\" notice, this list of conditions and the following disclaimer.
|
||
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||
|
.\" notice, this list of conditions and the following disclaimer in the
|
||
|
.\" documentation and/or other materials provided with the distribution.
|
||
|
.\" 3. All advertising materials mentioning features or use of this software
|
||
|
.\" must display the following acknowledgement:
|
||
|
.\" This product includes software developed by the University of
|
||
|
.\" California, Berkeley and its contributors.
|
||
|
.\" 4. Neither the name of the University nor the names of its contributors
|
||
|
.\" may be used to endorse or promote products derived from this software
|
||
|
.\" without specific prior written permission.
|
||
|
.\"
|
||
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
|
.\" SUCH DAMAGE.
|
||
|
.\"
|
||
|
.\" @(#)kadb.4 6.3 (Berkeley) 3/28/91
|
||
|
.\"
|
||
|
.Dd March 28, 1991
|
||
|
.Dt KADB 4
|
||
|
.Os
|
||
|
.Sh NAME
|
||
|
.Nm kdb
|
||
|
.Nd kernel debugging facility
|
||
|
.Sh SYNOPSIS
|
||
|
.Sy options
|
||
|
.Nm KADB
|
||
|
.Sh DESCRIPTION
|
||
|
.Nm Kdb
|
||
|
is a debugging facility for the kernel based on
|
||
|
.Xr adb 1 .
|
||
|
.Nm Kdb
|
||
|
may be used to symbolically examine and modify memory locations,
|
||
|
set breakpoints, and single step the system.
|
||
|
.Pp
|
||
|
Several boot time options are used in conjunction
|
||
|
with the debugger. To
|
||
|
.Dq enable
|
||
|
the debugger, the system
|
||
|
must be booted with the
|
||
|
.Dv RB_KDB
|
||
|
flag (0x40) specified in the
|
||
|
.Em boothowto
|
||
|
register. When the debugger is
|
||
|
enabled the system will read
|
||
|
in and initialize the symbol table from the booted system.
|
||
|
If the
|
||
|
.Dv RB_HALT
|
||
|
flag (0x08) is also specified, the system will
|
||
|
enter the debugger at the earliest possible time to allow
|
||
|
breakpoints to be set before the system starts operation.
|
||
|
From that point on, if the
|
||
|
.Dv RB_NOSYNC
|
||
|
flag (0x04) is set,
|
||
|
typing
|
||
|
.Ql ^[k ,
|
||
|
.Ql ^[K ,
|
||
|
or
|
||
|
.Ql ^[^K
|
||
|
at the
|
||
|
console causes a trap into the debugger.
|
||
|
.Pp
|
||
|
.Nm Kdb
|
||
|
supports most of the
|
||
|
.Xr adb
|
||
|
command language. The output formats
|
||
|
.Ql f ,
|
||
|
.Ql F ,
|
||
|
.Ql Y ,
|
||
|
are not
|
||
|
supported. The address space maps do not exist, thus the
|
||
|
.Ql \&m ,
|
||
|
.Ql \&m ,
|
||
|
and
|
||
|
.Ql \&m
|
||
|
commands do not exist. Shell escapes
|
||
|
and command files are not supported. The
|
||
|
.Ql \&r
|
||
|
and
|
||
|
.Ql \&k
|
||
|
commands make no sense and are not recognized. Finally, the
|
||
|
signal arguments to the continue and single step commands are
|
||
|
ignored.
|
||
|
.Sh NOTES
|
||
|
.Nm Kdb
|
||
|
normally runs at a priority level below the interrupt
|
||
|
level of the clock and all devices; the level of the highest priority
|
||
|
software interrupt. If the debugger is entered on the kernel's
|
||
|
per-process stack at an ipl below its normal operating level it
|
||
|
automatically switches to the interrupt stack to avoid potential
|
||
|
overflow of the kernel stack. Should the debugger operate on
|
||
|
the kernel stack the message
|
||
|
.Ql (on kernel stack)
|
||
|
will be printed
|
||
|
on entry.
|
||
|
.Pp
|
||
|
Note also that because
|
||
|
.Nm kdb
|
||
|
uses input from the console to force entry to the debugger it may
|
||
|
not be possible to force entry if the system hangs at a priority
|
||
|
level higher than the console receiver interrupt.
|
||
|
.Sh SEE ALSO
|
||
|
.Xr adb 1
|
||
|
.Sh HISTORY
|
||
|
The
|
||
|
.Nm
|
||
|
debugging facility
|
||
|
.Ud
|