1.\"- 2.\" Copyright (c) 2007 Robert N. M. Watson 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 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. 13.\" 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 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd 25 December, 2007 29.Dt DDB 8 30.Os 31.Sh NAME 32.Nm ddb 33.Nd Configure DDB kernel debugger properties 34.Sh SYNOPSIS 35.Nm 36.Cm script 37.Ar scriptname 38.Nm 39.Cm script 40.Ar scriptname=script 41.Nm 42.Cm scripts 43.Nm 44.Cm unscript 45.Ar scriptname 46.Sh DESCRIPTION 47.Nm 48configures certain aspects of the 49.Xr DDB 4 50kernel debugger from user space that are not configured at compile-time or 51easily via 52.Xr sysctl 8 53MIB entries. 54.Sh SCRIPTING 55.Nm 56can be used to configure aspects of 57.Xr DDB 4 58scripting from user space; scripting support is described in more detail in 59.Xr DDB 4 . 60Each of the debugger commands is available from the command line: 61.Bl -tag -width indent 62.It Cm script Ar scriptname 63Print the script named 64.Ar scriptname . 65.It Cm script Ar scriptname=scriptvalue 66Define a script named 67.Ar scriptname ; 68as many scripts contain characters interpreted in special ways by the shell, 69it is advisable to enclose 70.Ar scriptvalue 71in quotes. 72.It Cm scripts 73List currently defined scripts. 74.It Cm unset Ar scriptname 75Delete the script named 76.Ar scriptname . 77.El 78.Sh EXAMPLES 79The following example defines a script that will execute when the kernel 80debugger is entered as a result of a break signal: 81.Bd -literal -offset indent 82ddb script kdb.enter.break="show pcpu; bt" 83.Ed 84.Pp 85The following example will delete the script: 86.Bd -literal -offset indent 87ddb unscript kdb.enter.break 88.Ed 89.Pp 90For further examples, see the 91.Xr ddb 4 92and 93.Xr textdump 4 94man pages. 95.Sh EXIT STATUS 96.Ex -std 97.Sh SEE ALSO 98.Xr ddb 4 , 99.Xr textdump 4 , 100.Xr sysctl 8 101.Sh HISTORY 102.Nm 103first appeared in 104.Fx 8.0 . 105.Sh AUTHORS 106.An Robert N M Watson 107.Sh BUGS 108Ideally, 109.Nm 110would not exist, as all pertinent aspects of 111.Xr ddb 4 112could be configured directly via 113.Xr sysctl 8 . 114