aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/ddb
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2008-04-04 07:31:43 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2008-04-04 07:31:43 +0000
commit85018ba57b2b01ee5bbbf0467a96ce11623688ac (patch)
tree0e89bdc2db677a9c1ef86864ef91081fad2cbdd0 /sbin/ddb
parent5ffbd51eb073fd4c617d07865f5a816416a14900 (diff)
downloadsrc-85018ba57b2b01ee5bbbf0467a96ce11623688ac.tar.gz
src-85018ba57b2b01ee5bbbf0467a96ce11623688ac.zip
- Normalize usage(), add "ddb pathname" syntax.
- Revise the manpage.
Notes
Notes: svn path=/head/; revision=177909
Diffstat (limited to 'sbin/ddb')
-rw-r--r--sbin/ddb/ddb.843
-rw-r--r--sbin/ddb/ddb.c10
2 files changed, 28 insertions, 25 deletions
diff --git a/sbin/ddb/ddb.8 b/sbin/ddb/ddb.8
index 9f355f2c4531..0165f56fbefd 100644
--- a/sbin/ddb/ddb.8
+++ b/sbin/ddb/ddb.8
@@ -25,19 +25,19 @@
.\"
.\" $FreeBSD$
.\"
-.Dd 25 December, 2007
+.Dd April 4, 2008
.Dt DDB 8
.Os
.Sh NAME
.Nm ddb
-.Nd Configure DDB kernel debugger properties
+.Nd "configure DDB kernel debugger properties"
.Sh SYNOPSIS
.Nm
.Cm script
.Ar scriptname
.Nm
.Cm script
-.Ar scriptname=script
+.Ar scriptname Ns = Ns Ar script
.Nm
.Cm scripts
.Nm
@@ -46,9 +46,10 @@
.Nm
.Ar pathname
.Sh DESCRIPTION
+The
.Nm
-configures certain aspects of the
-.Xr DDB 4
+utility configures certain aspects of the
+.Xr ddb 4
kernel debugger from user space that are not configured at compile-time or
easily via
.Xr sysctl 8
@@ -64,24 +65,26 @@ The file will be read line by line and applied as arguments to the
.Nm
utility.
Whitespace at the beginning of lines will be ignored as will lines where the
-first non-whitespace character is #.
+first non-whitespace character is
+.Ql # .
.Sh SCRIPTING
+The
.Nm
-can be used to configure aspects of
-.Xr DDB 4
+utility can be used to configure aspects of
+.Xr ddb 4
scripting from user space; scripting support is described in more detail in
-.Xr DDB 4 .
+.Xr ddb 4 .
Each of the debugger commands is available from the command line:
.Bl -tag -width indent
.It Cm script Ar scriptname
Print the script named
.Ar scriptname .
-.It Cm script Ar scriptname=scriptvalue
+.It Cm script Ar scriptname Ns = Ns Ar script
Define a script named
-.Ar scriptname ;
-as many scripts contain characters interpreted in special ways by the shell,
+.Ar scriptname .
+As many scripts contain characters interpreted in special ways by the shell,
it is advisable to enclose
-.Ar scriptvalue
+.Ar script
in quotes.
.It Cm scripts
List currently defined scripts.
@@ -89,6 +92,8 @@ List currently defined scripts.
Delete the script named
.Ar scriptname .
.El
+.Sh EXIT STATUS
+.Ex -std
.Sh EXAMPLES
The following example defines a script that will execute when the kernel
debugger is entered as a result of a break signal:
@@ -97,24 +102,22 @@ ddb script kdb.enter.break="show pcpu; bt"
.Ed
.Pp
The following example will delete the script:
-.Bd -literal -offset indent
-ddb unscript kdb.enter.break
-.Ed
+.Pp
+.Dl "ddb unscript kdb.enter.break"
.Pp
For further examples, see the
.Xr ddb 4
and
.Xr textdump 4
-man pages.
-.Sh EXIT STATUS
-.Ex -std
+manual pages.
.Sh SEE ALSO
.Xr ddb 4 ,
.Xr textdump 4 ,
.Xr sysctl 8
.Sh HISTORY
+The
.Nm
-first appeared in
+utility first appeared in
.Fx 8.0 .
.Sh AUTHORS
.An Robert N M Watson
diff --git a/sbin/ddb/ddb.c b/sbin/ddb/ddb.c
index 869e34c30bab..5e86efc1e47b 100644
--- a/sbin/ddb/ddb.c
+++ b/sbin/ddb/ddb.c
@@ -43,11 +43,11 @@ void
usage(void)
{
- fprintf(stderr, "usage:\n");
- fprintf(stderr, "ddb script scriptname\n");
- fprintf(stderr, "ddb script scriptname=script\n");
- fprintf(stderr, "ddb scripts\n");
- fprintf(stderr, "ddb unscript scriptname\n");
+ fprintf(stderr, "usage: ddb script scriptname\n");
+ fprintf(stderr, " ddb script scriptname=script\n");
+ fprintf(stderr, " ddb scripts\n");
+ fprintf(stderr, " ddb unscript scriptname\n");
+ fprintf(stderr, " ddb pathname\n");
exit(EX_USAGE);
}