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.
110 utility can be used to configure aspects of
112 scripting from user space; scripting support is described in more detail in
114 Each of the debugger commands is available from the command line:
115 .Bl -tag -width indent
116 .It Cm script Ar scriptname
117 Print the script named
119 .It Cm script Ar scriptname Ns = Ns Ar script
120 Define a script named
122 As many scripts contain characters interpreted in special ways by the shell,
123 it is advisable to enclose
127 List currently defined scripts.
128 .It Cm unset Ar scriptname
129 Delete the script named
135 The following example defines a script that will execute when the kernel
136 debugger is entered as a result of a break signal:
137 .Bd -literal -offset indent
138 ddb script kdb.enter.break="show pcpu; bt"
141 The following example will delete the script:
143 .Dl "ddb unscript kdb.enter.break"
145 For further examples, see the
157 utility first appeared in
160 .An Robert N M Watson
164 would not exist, as all pertinent aspects of
166 could be configured directly via