aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1996-09-19 19:50:45 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1996-09-19 19:50:45 +0000
commit82e2dd32b608b6c687987fbb35d4d905b64560b8 (patch)
treeaa78ebf05198d1e2fcf011bd70e367d35bad75d0 /usr.bin
parent09ac2438bf13a7ef57bad701ab51a437930da10c (diff)
downloadsrc-82e2dd32b608b6c687987fbb35d4d905b64560b8.tar.gz
src-82e2dd32b608b6c687987fbb35d4d905b64560b8.zip
For now we just hexdump the stuff in USER records.
Notes
Notes: svn path=/head/; revision=18400
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/kdump/kdump.14
-rw-r--r--usr.bin/kdump/kdump.c19
2 files changed, 20 insertions, 3 deletions
diff --git a/usr.bin/kdump/kdump.1 b/usr.bin/kdump/kdump.1
index 5db704fab177..52c9da1271ec 100644
--- a/usr.bin/kdump/kdump.1
+++ b/usr.bin/kdump/kdump.1
@@ -42,7 +42,7 @@
.Op Fl dnlRT
.Op Fl f Ar file
.Op Fl m Ar maxdata
-.Op Fl t Op cnis
+.Op Fl t Op cnisu
.Sh DESCRIPTION
.Nm Kdump
displays the kernel trace files produced with
@@ -85,7 +85,7 @@ easily amenable to further processing.
Display relative timestamps (time since previous entry).
.It Fl T
Display absolute timestamps for each entry (seconds since epoch).
-.It Fl t Ar cnis
+.It Fl t Ar cnisuw
See the
.Fl t
option of
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index b290d4db4091..94111f682458 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -170,6 +170,9 @@ main(argc, argv)
case KTR_CSW:
ktrcsw((struct ktr_csw *)m);
break;
+ case KTR_USER:
+ ktruser((struct ktr_user *)m);
+ break;
}
if (tail)
(void)fflush(stdout);
@@ -215,6 +218,9 @@ dumpheader(kth)
case KTR_CSW:
type = "CSW";
break;
+ case KTR_USER:
+ type = "USER";
+ break;
default:
(void)sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type);
type = unknown;
@@ -433,9 +439,20 @@ ktrcsw(cs)
cs->user ? "user" : "kernel");
}
+ktruser(cs)
+ struct ktr_user *cs;
+{
+ unsigned char *p = (unsigned char *)(cs + 1);
+ (void)printf("%d ", cs->len);
+ while (cs->len--)
+ (void)printf(" %02x", *p++);
+ (void)printf("\n");
+
+}
+
usage()
{
(void)fprintf(stderr,
- "usage: kdump [-dnlRT] [-f trfile] [-m maxdata] [-t [cnis]]\n");
+ "usage: kdump [-dnlRT] [-f trfile] [-m maxdata] [-t [cnisuw]]\n");
exit(1);
}