summaryrefslogtreecommitdiff
path: root/usr.bin/ktrace
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2011-07-08 19:30:33 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2011-07-08 19:30:33 +0000
commitf8f4e446dabbd7230b584656e7e00b5aee898bc9 (patch)
tree54a3b8405cf31d5ddb5cd87b7128588bc63fec4c /usr.bin/ktrace
parentdfa0ffc7c86951f332886c661e930a834f5c9a36 (diff)
Support sending struct info to kdump. So far for struct stat and
struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@
Diffstat (limited to 'usr.bin/ktrace')
-rw-r--r--usr.bin/ktrace/ktrace.111
-rw-r--r--usr.bin/ktrace/ktrace.h4
-rw-r--r--usr.bin/ktrace/subr.c5
3 files changed, 13 insertions, 7 deletions
diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1
index 2c7afe1538e..c5105c5a43c 100644
--- a/usr.bin/ktrace/ktrace.1
+++ b/usr.bin/ktrace/ktrace.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ktrace.1,v 1.20 2011/06/25 18:44:43 jmc Exp $
+.\" $OpenBSD: ktrace.1,v 1.21 2011/07/08 19:29:44 otto Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)ktrace.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: June 25 2011 $
+.Dd $Mdocdate: July 8 2011 $
.Dt KTRACE 1
.Os
.Sh NAME
@@ -108,8 +108,9 @@ The default flags are
.Cm e ,
.Cm i ,
.Cm n ,
-and
-.Cm s .
+.Cm s ,
+and
+.Cm t .
The following table equates the letters with the tracepoints:
.Pp
.Bl -tag -width flag -offset indent -compact
@@ -123,6 +124,8 @@ trace I/O
trace namei translations
.It Cm s
trace signal processing
+.It Cm t
+trace various structures
.It Cm w
trace context switch points
.It Cm +
diff --git a/usr.bin/ktrace/ktrace.h b/usr.bin/ktrace/ktrace.h
index fdf135f8c27..f0ce8b9394b 100644
--- a/usr.bin/ktrace/ktrace.h
+++ b/usr.bin/ktrace/ktrace.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: ktrace.h,v 1.3 2003/06/03 02:56:09 millert Exp $*/
+/* * $OpenBSD: ktrace.h,v 1.4 2011/07/08 19:29:44 otto Exp $*/
/*-
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
*/
#define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \
- KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_EMUL)
+ KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_EMUL | KTRFAC_STRUCT)
#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW)
diff --git a/usr.bin/ktrace/subr.c b/usr.bin/ktrace/subr.c
index 2702c4ccd76..0b44bb02498 100644
--- a/usr.bin/ktrace/subr.c
+++ b/usr.bin/ktrace/subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.c,v 1.6 2009/10/27 23:59:39 deraadt Exp $ */
+/* $OpenBSD: subr.c,v 1.7 2011/07/08 19:29:44 otto Exp $ */
/* $NetBSD: subr.c,v 1.6 1995/08/31 23:01:45 jtc Exp $ */
/*-
@@ -68,6 +68,9 @@ getpoints(s)
case 'w':
facs |= KTRFAC_CSW;
break;
+ case 't':
+ facs |= KTRFAC_STRUCT;
+ break;
case '+':
facs |= DEF_POINTS;
break;