Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin add support for KTR_USER records



details:   https://anonhg.NetBSD.org/src/rev/9959f3760e79
branches:  trunk
changeset: 500721:9959f3760e79
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Dec 17 16:09:40 2000 +0000

description:
add support for KTR_USER records

diffstat:

 usr.bin/kdump/kdump.c   |  23 +++++++++++++++++++++--
 usr.bin/ktrace/ktrace.h |   4 ++--
 usr.bin/ktrace/subr.c   |   7 +++++--
 3 files changed, 28 insertions(+), 6 deletions(-)

diffs (111 lines):

diff -r b15b6e886785 -r 9959f3760e79 usr.bin/kdump/kdump.c
--- a/usr.bin/kdump/kdump.c     Sun Dec 17 16:04:51 2000 +0000
+++ b/usr.bin/kdump/kdump.c     Sun Dec 17 16:09:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kdump.c,v 1.31 2000/11/13 21:43:12 jdolecek Exp $      */
+/*     $NetBSD: kdump.c,v 1.32 2000/12/17 16:09:40 jdolecek Exp $      */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)kdump.c    8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: kdump.c,v 1.31 2000/11/13 21:43:12 jdolecek Exp $");
+__RCSID("$NetBSD: kdump.c,v 1.32 2000/12/17 16:09:40 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -104,6 +104,7 @@
 void   ktrgenio __P((struct ktr_genio *, int));
 void   ktrpsig __P((struct ktr_psig *));
 void   ktrcsw __P((struct ktr_csw *));
+void   ktruser __P((char *, int));
 void   usage __P((void));
 void   eprint __P((int));
 char   *ioctlname __P((long));
@@ -206,6 +207,9 @@
                case KTR_EMUL:
                        ktremul(m, ktrlen, size);
                        break;
+               case KTR_USER:
+                       ktruser(m, ktrlen);
+                       break;
                }
                if (tail)
                        (void)fflush(stdout);
@@ -257,6 +261,9 @@
        case KTR_EMUL:
                type = "EMUL";
                break;
+       case KTR_USER:
+               type = "USER";
+               break;
        default:
                (void)sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type);
                type = unknown;
@@ -560,6 +567,18 @@
 }
 
 void
+ktruser(name, len)
+       char *name;
+       int len;
+{
+       int i;
+       printf("\"%d, ", len);
+       for(i=0; i < len; i++)
+               printf("%x", name[i]);
+       printf("\"\n");
+}
+
+void
 usage()
 {
 
diff -r b15b6e886785 -r 9959f3760e79 usr.bin/ktrace/ktrace.h
--- a/usr.bin/ktrace/ktrace.h   Sun Dec 17 16:04:51 2000 +0000
+++ b/usr.bin/ktrace/ktrace.h   Sun Dec 17 16:09:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ktrace.h,v 1.9 2000/11/13 21:35:38 jdolecek Exp $      */
+/*     $NetBSD: ktrace.h,v 1.10 2000/12/17 16:09:40 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -36,7 +36,7 @@
  */
 
 #define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \
-                 KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_EMUL)
+                 KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_EMUL | KTRFAC_USER)
 
 #define ALL_POINTS (DEF_POINTS | KTRFAC_CSW)
 
diff -r b15b6e886785 -r 9959f3760e79 usr.bin/ktrace/subr.c
--- a/usr.bin/ktrace/subr.c     Sun Dec 17 16:04:51 2000 +0000
+++ b/usr.bin/ktrace/subr.c     Sun Dec 17 16:09:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr.c,v 1.7 1997/07/23 05:40:20 mikel Exp $   */
+/*     $NetBSD: subr.c,v 1.8 2000/12/17 16:09:41 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)subr.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: subr.c,v 1.7 1997/07/23 05:40:20 mikel Exp $");
+__RCSID("$NetBSD: subr.c,v 1.8 2000/12/17 16:09:41 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -76,6 +76,9 @@
                case 's':
                        facs |= KTRFAC_PSIG;
                        break;
+               case 'u':
+                       facs |= KTRFAC_USER;
+                       break;
                case 'w':
                        facs |= KTRFAC_CSW;
                        break;



Home | Main Index | Thread Index | Old Index