For now we just hexdump the stuff in USER records.
This commit is contained in:
parent
09ac2438bf
commit
82e2dd32b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18400
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user