2 .\" Copyright (c) 2007-2008 Robert N. M. Watson
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd "configure DDB kernel debugger properties"
50 .Ar scriptname Ns = Ns Ar script
61 utility configures certain aspects of the
63 kernel debugger from user space that are not configured at compile-time or
68 To ease configuration, commands can be put in a file which is processed using
70 as shown in the last synopsis line.
74 The file will be read line by line and applied as arguments to the
77 Whitespace at the beginning of lines will be ignored as will lines where the
78 first non-whitespace character is
83 utility can be used to extract the contents of the
85 output capture buffer of the current live kernel, or from the crash dump of a
87 The following debugger commands are available from the command line:
88 .Bl -tag -width indent
95 Print the current contents of the
97 output capture buffer.
104 Print the current status of the
106 output capture buffer.
111 utility can be used to configure aspects of
113 scripting from user space; scripting support is described in more detail in
115 Each of the debugger commands is available from the command line:
116 .Bl -tag -width indent
117 .It Cm script Ar scriptname
118 Print the script named
120 .It Cm script Ar scriptname Ns = Ns Ar script
121 Define a script named
123 As many scripts contain characters interpreted in special ways by the shell,
124 it is advisable to enclose
128 List currently defined scripts.
129 .It Cm unscript Ar scriptname
130 Delete the script named
136 The following example defines a script that will execute when the kernel
137 debugger is entered as a result of a break signal:
138 .Bd -literal -offset indent
139 ddb script kdb.enter.break="show pcpu; bt"
142 The following example will delete the script:
144 .Dl "ddb unscript kdb.enter.break"
146 For further examples, see the
158 utility first appeared in
161 .An Robert N M Watson
165 would not exist, as all pertinent aspects of
167 could be configured directly via