summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-09-19 19:50:45 +0000
committerphk <phk@FreeBSD.org>1996-09-19 19:50:45 +0000
commitdf8df7f4419922378eab01fcea6c3ca3a90169de (patch)
treeaa78ebf05198d1e2fcf011bd70e367d35bad75d0 /usr.bin
parentfcdb3184db6982f9de76c4a7dd82b3460be3f789 (diff)
downloadFreeBSD-src-df8df7f4419922378eab01fcea6c3ca3a90169de.zip
FreeBSD-src-df8df7f4419922378eab01fcea6c3ca3a90169de.tar.gz
For now we just hexdump the stuff in USER records.
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 5db704f..52c9da1 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 b290d4d..94111f6 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);
}
OpenPOWER on IntegriCloud