diff options
author | phk <phk@FreeBSD.org> | 1996-09-19 19:50:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-19 19:50:45 +0000 |
commit | df8df7f4419922378eab01fcea6c3ca3a90169de (patch) | |
tree | aa78ebf05198d1e2fcf011bd70e367d35bad75d0 | |
parent | fcdb3184db6982f9de76c4a7dd82b3460be3f789 (diff) | |
download | FreeBSD-src-df8df7f4419922378eab01fcea6c3ca3a90169de.zip FreeBSD-src-df8df7f4419922378eab01fcea6c3ca3a90169de.tar.gz |
For now we just hexdump the stuff in USER records.
-rw-r--r-- | usr.bin/kdump/kdump.1 | 4 | ||||
-rw-r--r-- | usr.bin/kdump/kdump.c | 19 |
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); } |