Sort commands alphabetically (wow, much easier to find things now).

Fix few commands using Cm instead of Ic [consisntency].

Make .Bl's -compact in most cases (where items are one-line entries);
dramatically improves readability
This commit is contained in:
jhawk 2000-05-22 11:28:36 +00:00
parent bacd71f681
commit b931e9206f
1 changed files with 277 additions and 277 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ddb.4,v 1.43 2000/05/21 05:42:01 soren Exp $
.\" $NetBSD: ddb.4,v 1.44 2000/05/22 11:28:36 jhawk Exp $
.\"
.\" Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -98,7 +98,7 @@ In general, sending a break on a serial console will activate
There are also key sequences for each port that will activate
.Nm
from the keyboard:
.Bl -tag -offset indent -width "mvme68k"
.Bl -tag -offset indent -width "mvme68k" -compact
.It alpha
<Ctrl>-<Alt>-<Esc> on PC style keyboards.
.It amiga
@ -244,6 +244,103 @@ retrieve next command in history (if any).
supports the following commands:
.Bl -tag -width 5n
.It Xo
.Sm off
.Ic !
.Ar address
.Oo
.Cm ( Ar expression
.Op Ar ,...
.Cm )
.Oc
.Sm on
.Xc
A synonym for
.Ic call .
.It Xo
.Ic break Ns Op Cm /u
.Ar address Ns Op Cm , Ns Ar count
.Xc
Set a breakpoint at
.Ar address .
If
.Ar count
is supplied, continues
.Pq Ar count Ns -1
times before stopping at the breakpoint.
If the breakpoint is set, a breakpoint number is printed with
.Sq \&# .
This number can be used to
.Ic delete
the breakpoint, or to add
conditions to it.
.Pp
If
.Cm /u
is specified,
set a breakpoint at a user-space address.
Without
.Cm /u ,
.Ar address
is considered to be in the kernel-space, and an address in the wrong
space will be rejected, and an error message will be emitted.
This modifier may only be used if it is supported by machine dependent
routines.
.Pp
Warning: if a user text is shadowed by a normal user-space debugger,
user-space breakpoints may not work correctly.
Setting a breakpoint at the low-level code paths may also cause
strange behavior.
.It Xo
.Ic call
.Sm off
.Ar address
.Oo
.Cm ( Ar expression
.Op Ar ,...
.Cm )
.Oc
.Sm on
.Xc
Call the function specified by
.Ar address
with the argument(s) listed in parentheses.
Parentheses may be omitted if the function takes no arguments.
The number of arguments is currently limited to 10.
.It Ic continue Ns Op Cm /c
Continue execution until a breakpoint or watchpoint.
If
.Cm /c
is specified, count instructions while executing.
Some machines (e.g., pmax) also count loads and stores.
.Pp
Warning: when counting, the debugger is really silently
single-stepping.
This means that single-stepping on low-level may cause strange
behavior.
.It Xo
.Ic delete
.Ar "address" |
.Cm # Ns Ar number
.Xc
Delete a breakpoint.
The target breakpoint may be specified by
.Ar address ,
as per
.Ic break ,
or by the breakpoint number returned by
.Ic break
if it's prefixed with
.Sq Cm \&# .
.It Xo
.Ic dwatch
.Ar address
.Xc
Delete the watchpoint at
.Ar address
that was previously set with
.Ic watch
command.
.It Xo
.Ic examine Ns Op Cm / Ns Ar modifier
.Ar address Ns Op Cm , Ns Ar count
.Xc
@ -259,7 +356,7 @@ is used.
The valid format characters for
.Ar modifier
are:
.Bl -tag -offset indent -width 2n
.Bl -tag -offset indent -width 2n -compact
.It Cm b
examine bytes (8 bits).
.It Cm h
@ -302,7 +399,7 @@ display as a machine instruction.
.It Cm I
display as a machine instruction, with possible alternative formats
depending upon the machine:
.Bl -tag -offset indent -width "sparc"
.Bl -tag -offset indent -width "sparc" -compact
.It alpha
print register operands
.It m68k
@ -314,29 +411,29 @@ don't assume that each external label is a procedure entry mask
.El
.El
.It Xo
.Ic x Ns Op Cm / Ns Ar modifier
.Ar address Ns Op Cm , Ns Ar count
.Ic kill
.Ar pid Ns Op Cm , Ns Ar signal_number
.Xc
Send a signal to the process specified by the
.Ar pid .
Note that
.Ar pid
is interpreted using the current radix (see
.Cm trace/t
command for details).
If
.Ar signal_number
isn't specified, the SIGTERM signal is sent.
.It Ic match Ns Op Cm /p
A synonym for
.Ic examine .
.\" XXX - these commands aren't implemented; jhawk 19 May 2000
.\" .It Ic xf
.\" Examine forward.
.\" .Ic xf
.\" re-executes the most recent
.\" .Ic execute
.\" command with the same parameters except that
.\" .Ar address
.\" is set to
.\" .Ar next .
.\" .It Ic xb
.\" Examine backward.
.\" .Ic xb
.\" re-executes the most recent
.\" .Ic execute
.\" command with the same parameters, except that
.\" .Ar address
.\" is set to the last start address minus its size.
.Ic next .
.It Ic next Ns Op Cm /p
Stop at the matching return instruction.
If
.Cm /p
is specified, print the call nesting depth and the
cumulative instruction count at each call or return.
Otherwise, only print when the matching return is hit.
.It Xo
.Ic print Ns Op Cm /axzodurc
.Ar address Op Ar address ...
@ -372,180 +469,21 @@ eax = xxxxxx
ecx = yyyyyy
.Ed
.It Xo
.Ic write Ns Op Cm /bhl
.Ar address
.Ar expression Op Ar expression ...
.Xc
Write the
.Ar expression Ns s
at succeeding locations.
The unit size is specified with a modifier character, as per
.Ic examine .
Valid modifiers are:
.Cm /b ,
.Cm /h ,
and
.Cm /l .
If no modifier is specified,
.Cm /l
is used.
.Pp
Warning: since there is no delimiter between
.Ar expression Ns s ,
strange things may occur.
It's best to enclose each
.Ar expression
in parentheses.
.It Xo
.Ic set
.Cm $ Ns Ar variable
.Op Cm =
.Ar expression
.Xc
Set the named variable or register to the value of
.Ar expression .
Valid variable names are described in
.Sx VARIABLES .
.It Xo
.Cm break Ns Op Cm /u
.Ar address Ns Op Cm , Ns Ar count
.Xc
Set a breakpoint at
.Ar address .
If
.Ar count
is supplied, continues
.Pq Ar count Ns -1
times before stopping at the breakpoint.
If the breakpoint is set, a breakpoint number is printed with
.Sq \&# .
This number can be used to
.Ic delete
the breakpoint, or to add
conditions to it.
.Pp
If
.Cm /u
is specified,
set a breakpoint at a user-space address.
Without
.Cm /u ,
.Ar address
is considered to be in the kernel-space, and an address in the wrong
space will be rejected, and an error message will be emitted.
This modifier may only be used if it is supported by machine dependent
routines.
.Pp
Warning: if a user text is shadowed by a normal user-space debugger,
user-space breakpoints may not work correctly.
Setting a breakpoint at the low-level code paths may also cause
strange behavior.
.It Xo
.Ic delete
.Ar "address" |
.Cm # Ns Ar number
.Xc
Delete a breakpoint.
The target breakpoint may be specified by
.Ar address ,
as per
.Ic break ,
or by the breakpoint number returned by
.Ic break
if it's prefixed with
.Sq Cm \&# .
.It Xo
.Ic step Ns Op Cm /p
.Op Cm , Ns Ar count
.Xc
Single-step
.Ar count
times.
If
.Cm /p
is specified, print each instruction at each step.
Otherwise, only print the last instruction.
.Pp
Warning: depending on the machine type, it may not be possible
to single-step through some low-level code paths or user-space
code.
On machines with software-emulated single-stepping (e.g., pmax),
stepping through code executed by interrupt handlers will probably
do the wrong thing.
.It Ic continue Ns Op Cm /c
Continue execution until a breakpoint or watchpoint.
If
.Cm /c
is specified, count instructions while executing.
Some machines (e.g., pmax) also count loads and stores.
.Pp
Warning: when counting, the debugger is really silently
single-stepping.
This means that single-stepping on low-level may cause strange
behavior.
.It Ic until Ns Op Cm /p
Stop at the next call or return instruction.
If
.Cm /p
is specified, print the call nesting depth and the
cumulative instruction count at each call or return.
Otherwise, only print when the matching return is hit.
.It Ic next Ns Op Cm /p
Stop at the matching return instruction.
If
.Cm /p
is specified, print the call nesting depth and the
cumulative instruction count at each call or return.
Otherwise, only print when the matching return is hit.
.It Ic match Ns Op Cm /p
A synonym for
.Ic next .
.It Xo
.Cm trace Ns Op Cm /u
.Sm off
.Op Ar frame-address
.Op Cm , Ar count
.Sm on
.Xc
Stack trace from
.Ar frame-address .
If
.Cm /u
is specified, trace user-space, otherwise trace kernel-space.
.Ar count
is the number of frames to be traced.
If
.Ar count
is omitted, all frames are printed.
.Pp
Warning: user-space stack trace is valid only if the machine dependent
code supports it.
.It Xo
.Cm trace/t
.Sm off
.Op Ar pid
.Op Cm , Ar count
.Sm on
.Xc
Stack trace by
.Dq thread
(process, on
.Nx )
rather than by stack frame address.
Note that
.Ar pid
is interpreted using the current radix, whilst
.Ic ps
displays pids in decimal; prefix
.Ar pid
with
.Sq 0t
to force it to be interpreted as decimal (see
.Sx VARIABLES
section for radix)
.Op Cm /a
.Op Cm /n
.Op Cm /w
.Sm on
.Xc
A synonym for
.Ic "show all procs" .
.It Ic reboot Op Ar flags
Reboot, using the optionally supplied boot
.Ar flags .
.Pp
Warning: trace by pid is valid only if the machine dependent code
supports it.
Note: Limitations of the command line interface preclude
specification of a boot string.
.It Xo
.Ic search Ns Op Cm /bhl
.Ar address
@ -576,14 +514,16 @@ doesn't always recover from touching bad memory.
The optional
.Ar count
limits the search.
.It Ic reboot Op Ar flags
Reboot, using the optionally supplied boot
.Ar flags .
.Pp
Note: Limitations of the command line interface preclude
specification of a boot string.
.It Ic sync
Force a crash dump, and then reboot.
.It Xo
.Ic set
.Cm $ Ns Ar variable
.Op Cm =
.Ar expression
.Xc
Set the named variable or register to the value of
.Ar expression .
Valid variable names are described in
.Sx VARIABLES .
.It Xo
.Sm off
.Ic "show\ all\ procs"
@ -614,27 +554,6 @@ show each process' PID, command, system call emulation, wait channel
address, and wait channel message.
.El
.It Xo
.Sm off
.Ic ps
.Op Cm /a
.Op Cm /n
.Op Cm /w
.Sm on
.Xc
A synonym for
.Ic "show all procs" .
.It Ic "show registers" Ns Op Cm /u
Display the register set.
If
.Cm /u
is specified, display user registers instead of kernel registers
or the currently save one.
.Pp
Warning: support for
.Cm /u
is machine dependent.
If not supported, incorrect information will be displayed.
.It Xo
.Ic "show map" Ns Op Cm /f
.Ar address
.Xc
@ -652,9 +571,93 @@ Print the vm_object at
If
.Cm /f
is specified the complete object is printed.
.It Ic "show registers" Ns Op Cm /u
Display the register set.
If
.Cm /u
is specified, display user registers instead of kernel registers
or the currently save one.
.Pp
Warning: support for
.Cm /u
is machine dependent.
If not supported, incorrect information will be displayed.
.It Ic "show watches"
Display all watchpoints.
.It Xo
.Ic step Ns Op Cm /p
.Op Cm , Ns Ar count
.Xc
Single-step
.Ar count
times.
If
.Cm /p
is specified, print each instruction at each step.
Otherwise, only print the last instruction.
.Pp
Warning: depending on the machine type, it may not be possible
to single-step through some low-level code paths or user-space
code.
On machines with software-emulated single-stepping (e.g., pmax),
stepping through code executed by interrupt handlers will probably
do the wrong thing.
.It Ic sync
Force a crash dump, and then reboot.
.It Xo
.Ic trace Ns Op Cm /u
.Sm off
.Op Ar frame-address
.Op Cm , Ar count
.Sm on
.Xc
Stack trace from
.Ar frame-address .
If
.Cm /u
is specified, trace user-space, otherwise trace kernel-space.
.Ar count
is the number of frames to be traced.
If
.Ar count
is omitted, all frames are printed.
.Pp
Warning: user-space stack trace is valid only if the machine dependent
code supports it.
.It Xo
.Ic trace/t
.Sm off
.Op Ar pid
.Op Cm , Ar count
.Sm on
.Xc
Stack trace by
.Dq thread
(process, on
.Nx )
rather than by stack frame address.
Note that
.Ar pid
is interpreted using the current radix, whilst
.Ic ps
displays pids in decimal; prefix
.Ar pid
with
.Sq 0t
to force it to be interpreted as decimal (see
.Sx VARIABLES
section for radix)
.Pp
Warning: trace by pid is valid only if the machine dependent code
supports it.
.It Ic until Ns Op Cm /p
Stop at the next call or return instruction.
If
.Cm /p
is specified, print the call nesting depth and the
cumulative instruction count at each call or return.
Otherwise, only print when the matching return is hit.
.It Xo
.Ic watch
.Sm off
.Ar address
@ -673,57 +676,54 @@ Warning: attempts to watch wired kernel memory may cause
an unrecoverable error in some systems such as i386.
Watchpoints on user addresses work the best.
.It Xo
.Ic dwatch
.Ic write Ns Op Cm /bhl
.Ar address
.Ar expression Op Ar expression ...
.Xc
Delete the watchpoint at
.Ar address
that was previously set with
.Ic watch
command.
Write the
.Ar expression Ns s
at succeeding locations.
The unit size is specified with a modifier character, as per
.Ic examine .
Valid modifiers are:
.Cm /b ,
.Cm /h ,
and
.Cm /l .
If no modifier is specified,
.Cm /l
is used.
.Pp
Warning: since there is no delimiter between
.Ar expression Ns s ,
strange things may occur.
It's best to enclose each
.Ar expression
in parentheses.
.It Xo
.Ic kill
.Ar pid Ns Op Cm , Ns Ar signal_number
.Xc
Send a signal to the process specified by the
.Ar pid .
Note that
.Ar pid
is interpreted using the current radix (see
.Cm trace/t
command for details).
If
.Ar signal_number
isn't specified, the SIGTERM signal is sent.
.It Xo
.Ic call
.Sm off
.Ar address
.Oo
.Cm ( Ar expression
.Op Ar ,...
.Cm )
.Oc
.Sm on
.Xc
Call the function specified by
.Ar address
with the argument(s) listed in parentheses.
Parentheses may be omitted if the function takes no arguments.
The number of arguments is currently limited to 10.
.It Xo
.Sm off
.Ic !
.Ar address
.Oo
.Cm ( Ar expression
.Op Ar ,...
.Cm )
.Oc
.Sm on
.Ic x Ns Op Cm / Ns Ar modifier
.Ar address Ns Op Cm , Ns Ar count
.Xc
A synonym for
.Ic call .
.Ic examine .
.\" XXX - these commands aren't implemented; jhawk 19 May 2000
.\" .It Ic xf
.\" Examine forward.
.\" .Ic xf
.\" re-executes the most recent
.\" .Ic execute
.\" command with the same parameters except that
.\" .Ar address
.\" is set to
.\" .Ar next .
.\" .It Ic xb
.\" Examine backward.
.\" .Ic xb
.\" re-executes the most recent
.\" .Ic execute
.\" command with the same parameters, except that
.\" .Ar address
.\" is set to the last start address minus its size.
.El
.Sh MACHINE-SPECIFIC COMMANDS
The "glue" code that hooks
@ -742,14 +742,14 @@ set (e.g.
).
Some of these commands are:
.Ss ALPHA
.Bl -tag -width "intrchain"
.Bl -tag -width "intrchain" -compact
.It Ic halt
Call the PROM monitor to halt the CPU.
.It Ic reboot
Call the PROM monitor to reboot the CPU.
.El
.Ss ARM32
.Bl -tag -width "intrchain"
.Bl -tag -width "intrchain" -compact
.It Ic vmstat
Equivalent to
.Xr vmstat 8
@ -764,7 +764,7 @@ Print the current "panic" string.
Given a trap frame address, print out the trap frame.
.El
.Ss MIPS
.Bl -tag -width "intrchain"
.Bl -tag -width "intrchain" -compact
.It Ic kvtop
Print the physical address for a given kernel virtual address.
.It Ic tlb
@ -776,12 +776,12 @@ kernels compiled with
option.
.El
.Ss SPARC
.Bl -tag -width "intrchain"
.Bl -tag -width "intrchain" -compact
.It Ic prom
Exit to the Sun PROM monitor.
.El
.Ss SUN3 and SUN3X
.Bl -tag -width "intrchain"
.Bl -tag -width "intrchain" -compact
.It Ic abort
Drop into monitor via abort (allows continue).
.It Ic halt
@ -810,7 +810,7 @@ modifier to indicate user register
.Li "$eax:u" ) .
.Pp
Built-in variables currently supported are:
.Bl -tag -offset indent -width "maxwidth"
.Bl -tag -offset indent -width "maxwidth" -compact
.It Va lines
The number of lines.
This is used by the