- Normalize usage(), add "ddb pathname" syntax.
- Revise the manpage.
This commit is contained in:
parent
5ffbd51eb0
commit
85018ba57b
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user