Manual page for kadb(1M)
kadb - a kernel debugger
> b kadb
> run kadb
is an interactive debugger with a user interface similar to that of
the assembly language debugger.
must be loaded prior to the standalone program it is to debug.
runs with the
same environment as the standalone program, so it shares many resources with
that program. The debugger is cognizant of and able to control multiple
processors, should they be present in a system.
runs in the same supervisor virtual address space as the program being
debugged -- although it maintains a separate context.
The debugger runs as a
that cannot be killed (no
or rerun (no
There is no signal control (no
although the keyboard facilities
In the case of the
system kernel, the keyboard abort sequence will suspend kernel operations and break into the debugger.
system, the keyboard abort sequence is
for the console, and
for a serial line.
On an x86 system,
the keyboard abort sequence is
for the console.
gives the prompt:
it is currently executing on.
Since the kernel is composed of the core image file
and the set of loadable modules already in memory,
has the capability of debugging all of these by traversing special data
makes use of this feature to allow it to reference any kernel data structure,
even if it resides in a loadable module.
will set the
flag by default so the program being debugged can tell it is being watched.
If this flag is not given,
will load and immediately run the default kernel .
specifies the device to load from (see
commands function in
works when debugging
are equivalent in
since there is only one address space in use.
has the following additional commands.
(Note: for the general syntax of
but requires only one keystroke and no
but requires only one keystroke and no
Additional x86 Commands
Sets a hardware access (read or write) breakpoint using
the processor hardware facilities. The syntax and action for
this is the same as
with the following exceptions:
breakpoint will trigger if any bytes from the breakpoint for length
bytes are being accessed. See
for setting the length of a hardware breakpoint.
- breakpoints should be aligned for the length specified.
Any address is valid for length 1.
Addresses divisible by 2 should be used for length 2 (short).
Addresses divisible by 4 should be used for length 4 (long).
- for an access to be detected it must complete the
instruction that caused the access. This means that this
breakpoint will stop after the access not before.
- there are a limited number of hardware breakpoint
registers (4) and when set this will use one.
- since this breakpoint does not modify memory locations this will work
on locations that are not in core at the time the breakpoint
but will only breakpoint on a write to the specified address.
but will only breakpoint when an instruction at the specified address
is run. Note that the
has no effect on this type of breakpoint.
This breakpoint will occur before the instruction
Sets the default data length for an access or
The syntax for this command is
Length can be set to one for byte, two for short and 4 for long
word accesses. If length is left off byte will be assumed.
Once set this value will affect any newly set access or write
breakpoints. But will not affect ones set before this operation.
Has two additional columns that
not have. The first is the
which indicates soft for a normal breakpoint, access for an access
hardware breakpoint, write for a write hardware breakpoint, and
inst for an instruction hardware breakpoint.
The second is the
which for access and write breakpoints indicate the length of the
operation to break on.
Will input a byte for display from the address specified io port.
For example .B 330:i
input from address port
Will output a byte to the address specified io port.
output data byte to address io port.
output 80 to address port
If this flag is given,
will stop after it is loaded and display the
and the name of the default
program to debug. For example:
The user may either press Return to use the default, or backspace and
type in the name of another
program to debug.
- kadb: kernel/unix
You can specify boot flags as arguments when invoking
Boot flags are passed to the program being debugged. See
the manual page
for relevant boot flags.
macros can be used with
but they cannot be read from a file at runtime. The
lists all the macros built into
the debugger itself
the default kernel
gives the same cryptic response as
cannot reliably single-step over instructions which change the processor
can be found using the
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97