summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-09 23:04:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-09 23:04:50 +0000
commitd820f3e3ba1e6e29ce2bf7dcd9ec368578f3f3d7 (patch)
tree5ec3967e190bbeba0c2ab7e8e86b3f45ba20c19a /share
parent4ad0571c604526a0bb64f7b2d6e62d9ac8366227 (diff)
Introduce option DDB_STRUCT. Kernels compiled with this option (except on
a few arches where toolchain limitations apply) will embed some symbolic information about the various structs used within the kernel, and have new ddb commands allowing struct display and some useful information gathering. Kernel rodata increase varies accross platforms from ~150KB to ~300KB. This option is not enabled by default.
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/ddb.431
-rw-r--r--share/man/man4/options.411
2 files changed, 36 insertions, 6 deletions
diff --git a/share/man/man4/ddb.4 b/share/man/man4/ddb.4
index 9fbc577ca4b..63184655eec 100644
--- a/share/man/man4/ddb.4
+++ b/share/man/man4/ddb.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ddb.4,v 1.58 2009/02/22 15:10:41 jsing Exp $
+.\" $OpenBSD: ddb.4,v 1.59 2009/08/09 23:04:47 miod Exp $
.\" $NetBSD: ddb.4,v 1.5 1994/11/30 16:22:09 jtc Exp $
.\"
.\" Mach Operating System
@@ -25,7 +25,7 @@
.\" any improvements or extensions that they make and grant Carnegie Mellon
.\" the rights to redistribute these changes.
.\"
-.Dd $Mdocdate: February 22 2009 $
+.Dd $Mdocdate: August 9 2009 $
.Dt DDB 4
.Os
.Sh NAME
@@ -96,6 +96,7 @@ the current location is called
The
.Ic examine ,
.Ic search ,
+.Ic show struct,
and
.Ic write
commands update
@@ -679,6 +680,17 @@ If the
modifier is specified the complete object is printed.
.\" --------------------
.It Xo
+.Ic show offset
+.Ar offset
+.Xc
+Prints a list of the known kernel structure fields which occur at the given
+.Ar offset
+from the beginning of the struct, as well as their size.
+The
+.Cm option DDB_STRUCT
+is required for this command to be available.
+.\" --------------------
+.It Xo
.Ic show page
.Op Cm /f
.Ar addr
@@ -733,6 +745,21 @@ Note: The
modifier is not supported on every machine, in which case
incorrect information may be displayed.
.\" --------------------
+.It Xo
+.Ic show struct
+.Ar name
+.Op addr
+.Xc
+Prints the content of the memory at
+.Ar addr
+as a struct
+.Ar name .
+Nested structures and bit fields are not printed.
+Character arrays are printed as bytes.
+The
+.Cm option DDB_STRUCT
+is required for this command to be available.
+.\" --------------------
.It Ic show uvmexp
Displays a selection of uvm counters and statistics.
.\" --------------------
diff --git a/share/man/man4/options.4 b/share/man/man4/options.4
index 5009903de76..3937873330b 100644
--- a/share/man/man4/options.4
+++ b/share/man/man4/options.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: options.4,v 1.192 2009/06/04 13:30:07 jmc Exp $
+.\" $OpenBSD: options.4,v 1.193 2009/08/09 23:04:47 miod Exp $
.\" $NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $
.\"
.\" Copyright (c) 1998 Theo de Raadt
@@ -34,7 +34,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: June 4 2009 $
+.Dd $Mdocdate: August 9 2009 $
.Dt OPTIONS 4
.Os
.Sh NAME
@@ -216,11 +216,14 @@ Compiles in a kernel debugger for diagnosing kernel problems.
See
.Xr ddb 4
for details.
-.Em Note:
-not available on all architectures.
.It Cd option DDB_SAFE_CONSOLE
Allows a break into the kernel debugger during boot.
Useful when debugging problems that can cause init(8) to fail.
+.It Cd option DDB_STRUCT
+Compiles in symbolic information about the various data structures used by the
+kernel, for use within the kernel debugger.
+This option is currently not supported on alpha, m68k, m88k and vax based
+platforms.
.It Cd option DEBUG
Turns on miscellaneous kernel debugging.
Since options are turned into preprocessor defines (see above),