- Normalize usage(), add "ddb pathname" syntax.
- Revise the manpage.
This commit is contained in:
parent
5ffbd51eb0
commit
85018ba57b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177909
@ -25,19 +25,19 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd 25 December, 2007
|
.Dd April 4, 2008
|
||||||
.Dt DDB 8
|
.Dt DDB 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm ddb
|
.Nm ddb
|
||||||
.Nd Configure DDB kernel debugger properties
|
.Nd "configure DDB kernel debugger properties"
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Cm script
|
.Cm script
|
||||||
.Ar scriptname
|
.Ar scriptname
|
||||||
.Nm
|
.Nm
|
||||||
.Cm script
|
.Cm script
|
||||||
.Ar scriptname=script
|
.Ar scriptname Ns = Ns Ar script
|
||||||
.Nm
|
.Nm
|
||||||
.Cm scripts
|
.Cm scripts
|
||||||
.Nm
|
.Nm
|
||||||
@ -46,9 +46,10 @@
|
|||||||
.Nm
|
.Nm
|
||||||
.Ar pathname
|
.Ar pathname
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
|
The
|
||||||
.Nm
|
.Nm
|
||||||
configures certain aspects of the
|
utility configures certain aspects of the
|
||||||
.Xr DDB 4
|
.Xr ddb 4
|
||||||
kernel debugger from user space that are not configured at compile-time or
|
kernel debugger from user space that are not configured at compile-time or
|
||||||
easily via
|
easily via
|
||||||
.Xr sysctl 8
|
.Xr sysctl 8
|
||||||
@ -64,24 +65,26 @@ The file will be read line by line and applied as arguments to the
|
|||||||
.Nm
|
.Nm
|
||||||
utility.
|
utility.
|
||||||
Whitespace at the beginning of lines will be ignored as will lines where the
|
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
|
.Sh SCRIPTING
|
||||||
|
The
|
||||||
.Nm
|
.Nm
|
||||||
can be used to configure aspects of
|
utility can be used to configure aspects of
|
||||||
.Xr DDB 4
|
.Xr ddb 4
|
||||||
scripting from user space; scripting support is described in more detail in
|
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:
|
Each of the debugger commands is available from the command line:
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Cm script Ar scriptname
|
.It Cm script Ar scriptname
|
||||||
Print the script named
|
Print the script named
|
||||||
.Ar scriptname .
|
.Ar scriptname .
|
||||||
.It Cm script Ar scriptname=scriptvalue
|
.It Cm script Ar scriptname Ns = Ns Ar script
|
||||||
Define a script named
|
Define a script named
|
||||||
.Ar scriptname ;
|
.Ar scriptname .
|
||||||
as many scripts contain characters interpreted in special ways by the shell,
|
As many scripts contain characters interpreted in special ways by the shell,
|
||||||
it is advisable to enclose
|
it is advisable to enclose
|
||||||
.Ar scriptvalue
|
.Ar script
|
||||||
in quotes.
|
in quotes.
|
||||||
.It Cm scripts
|
.It Cm scripts
|
||||||
List currently defined scripts.
|
List currently defined scripts.
|
||||||
@ -89,6 +92,8 @@ List currently defined scripts.
|
|||||||
Delete the script named
|
Delete the script named
|
||||||
.Ar scriptname .
|
.Ar scriptname .
|
||||||
.El
|
.El
|
||||||
|
.Sh EXIT STATUS
|
||||||
|
.Ex -std
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
The following example defines a script that will execute when the kernel
|
The following example defines a script that will execute when the kernel
|
||||||
debugger is entered as a result of a break signal:
|
debugger is entered as a result of a break signal:
|
||||||
@ -97,24 +102,22 @@ ddb script kdb.enter.break="show pcpu; bt"
|
|||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The following example will delete the script:
|
The following example will delete the script:
|
||||||
.Bd -literal -offset indent
|
.Pp
|
||||||
ddb unscript kdb.enter.break
|
.Dl "ddb unscript kdb.enter.break"
|
||||||
.Ed
|
|
||||||
.Pp
|
.Pp
|
||||||
For further examples, see the
|
For further examples, see the
|
||||||
.Xr ddb 4
|
.Xr ddb 4
|
||||||
and
|
and
|
||||||
.Xr textdump 4
|
.Xr textdump 4
|
||||||
man pages.
|
manual pages.
|
||||||
.Sh EXIT STATUS
|
|
||||||
.Ex -std
|
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr ddb 4 ,
|
.Xr ddb 4 ,
|
||||||
.Xr textdump 4 ,
|
.Xr textdump 4 ,
|
||||||
.Xr sysctl 8
|
.Xr sysctl 8
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
|
The
|
||||||
.Nm
|
.Nm
|
||||||
first appeared in
|
utility first appeared in
|
||||||
.Fx 8.0 .
|
.Fx 8.0 .
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An Robert N M Watson
|
.An Robert N M Watson
|
||||||
|
@ -43,11 +43,11 @@ void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(stderr, "usage:\n");
|
fprintf(stderr, "usage: ddb script scriptname\n");
|
||||||
fprintf(stderr, "ddb script scriptname\n");
|
fprintf(stderr, " ddb script scriptname=script\n");
|
||||||
fprintf(stderr, "ddb script scriptname=script\n");
|
fprintf(stderr, " ddb scripts\n");
|
||||||
fprintf(stderr, "ddb scripts\n");
|
fprintf(stderr, " ddb unscript scriptname\n");
|
||||||
fprintf(stderr, "ddb unscript scriptname\n");
|
fprintf(stderr, " ddb pathname\n");
|
||||||
exit(EX_USAGE);
|
exit(EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user