Source-Changes-HG archive

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

[src/trunk]: src/sys/arch remove MD functions for printing vnodes and buffers...



details:   https://anonhg.NetBSD.org/src/rev/6a9c12db6bff
branches:  trunk
changeset: 499521:6a9c12db6bff
user:      chs <chs%NetBSD.org@localhost>
date:      Tue Nov 21 16:34:52 2000 +0000

description:
remove MD functions for printing vnodes and buffers since there are
MI versions now.

diffstat:

 sys/arch/arm32/arm32/db_interface.c     |   4 +-
 sys/arch/arm32/arm32/db_machdep.c       |  60 +--------------------------------
 sys/arch/sparc64/sparc64/db_interface.c |  42 +----------------------
 3 files changed, 3 insertions(+), 103 deletions(-)

diffs (169 lines):

diff -r b1a22761bd77 -r 6a9c12db6bff sys/arch/arm32/arm32/db_interface.c
--- a/sys/arch/arm32/arm32/db_interface.c       Tue Nov 21 16:12:48 2000 +0000
+++ b/sys/arch/arm32/arm32/db_interface.c       Tue Nov 21 16:34:52 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.31 2000/06/29 08:52:57 mrg Exp $    */
+/*     $NetBSD: db_interface.c,v 1.32 2000/11/21 16:34:52 chs Exp $    */
 
 /* 
  * Copyright (c) 1996 Scott K. Stevens
@@ -301,7 +301,6 @@
 }
 
 void db_show_vmstat_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif));
-void db_show_vnode_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif));
 void db_show_intrchain_cmd     __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif));
 void db_show_panic_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif));
 void db_show_frame_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif));
@@ -321,7 +320,6 @@
 #endif
        { "panic",      db_show_panic_cmd,      0, NULL },
        { "vmstat",     db_show_vmstat_cmd,     0, NULL },
-       { "vnode",      db_show_vnode_cmd,      0, NULL },
        { NULL,         NULL,                   0, NULL }
 };
 
diff -r b1a22761bd77 -r 6a9c12db6bff sys/arch/arm32/arm32/db_machdep.c
--- a/sys/arch/arm32/arm32/db_machdep.c Tue Nov 21 16:12:48 2000 +0000
+++ b/sys/arch/arm32/arm32/db_machdep.c Tue Nov 21 16:34:52 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.c,v 1.15 2000/05/25 19:57:32 jhawk Exp $    */
+/*     $NetBSD: db_machdep.c,v 1.16 2000/11/21 16:34:53 chs Exp $      */
 
 /* 
  * Copyright (c) 1996 Mark Brinicombe
@@ -45,64 +45,6 @@
 #include <dev/ofw/openfirm.h>
 #endif
 
-/*
- * Print out a description of a vnode.
- * Some parts borrowed from kern/vfs_subr.c
- */
- 
-static char *typename[] =
-   { "VNON", "VREG", "VDIR", "VBLK", "VCHR", "VLNK", "VSOCK", "VFIFO", "VBAD" };
-
-void
-db_show_vnode_cmd(addr, have_addr, count, modif)
-       db_expr_t       addr;
-       int             have_addr;
-       db_expr_t       count;
-       char            *modif;
-{
-       char buf[64];
-       struct vnode *vp;
-
-       if (!have_addr) {
-               db_printf("vnode address must be specified\n");
-               return;
-       }
-
-       vp = (struct vnode *)addr;
-
-/* Decode the one argument */
-
-       db_printf("vp : %08x\n", (u_int)vp);
-       db_printf("vp->v_type = %d\n", vp->v_type);
-       db_printf("vp->v_flag = %ld\n", vp->v_flag);
-       db_printf("vp->v_numoutput = %ld\n", vp->v_numoutput);
-
-       db_printf("type %s, usecount %ld, writecount %ld, refcount %ld,",
-               typename[vp->v_type], vp->v_usecount, vp->v_writecount,
-               vp->v_holdcnt);
-       buf[0] = '\0';
-       if (vp->v_flag & VROOT)
-               strcat(buf, "|VROOT");
-       if (vp->v_flag & VTEXT)
-               strcat(buf, "|VTEXT");
-       if (vp->v_flag & VSYSTEM)
-               strcat(buf, "|VSYSTEM");
-       if (vp->v_flag & VXLOCK)
-               strcat(buf, "|VXLOCK");
-       if (vp->v_flag & VXWANT)
-               strcat(buf, "|VXWANT");
-       if (vp->v_flag & VBWAIT)
-               strcat(buf, "|VBWAIT");
-       if (vp->v_flag & VALIASED)
-               strcat(buf, "|VALIASED");
-       if (buf[0] != '\0')
-               db_printf(" flags (%s)", &buf[1]);
-               db_printf("\n");
-       if (vp->v_data != NULL) {
-               db_printf("data=%08x\n", (u_int)vp->v_data);
-       }
-}
-
 void
 db_show_vmstat_cmd(addr, have_addr, count, modif)
        db_expr_t       addr;
diff -r b1a22761bd77 -r 6a9c12db6bff sys/arch/sparc64/sparc64/db_interface.c
--- a/sys/arch/sparc64/sparc64/db_interface.c   Tue Nov 21 16:12:48 2000 +0000
+++ b/sys/arch/sparc64/sparc64/db_interface.c   Tue Nov 21 16:34:52 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.45 2000/10/19 05:30:29 mrg Exp $ */
+/*     $NetBSD: db_interface.c,v 1.46 2000/11/21 16:34:53 chs Exp $ */
 
 /*
  * Mach Operating System
@@ -572,7 +572,6 @@
        }
 
        db_printf("pa %llx pg %p\n", addr, PHYS_TO_VM_PAGE(addr));
-       
 }
 
 
@@ -831,44 +830,6 @@
 }
 
 
-#include <sys/buf.h>
-
-void
-db_dump_buf(addr, have_addr, count, modif)
-       db_expr_t addr;
-       int have_addr;
-       db_expr_t count;
-       char *modif;
-{
-       struct buf *buf;
-       static const char flagnames[] =
-               "\20\034VFLUSH\033XXX\032WRITEINPROG\031WRITE\030WANTED"
-               "\027UAREA\026TAPE\025READ\024RAW\023PHYS\022PAGIN\021PAGET"
-               "\020NOCACHE\017LOCKED\016INVAL\015GATHERED\014ERROR\013EINTR"
-               "\012DONE\011DIRTY\010DELWRI\007CALL\006CACHE\005BUSY\004BAD"
-               "\003ASYNC\002NEEDCOMMIT\001AGE";
-
-       char sbuf[sizeof(flagnames) + 64];
-
-       if (!have_addr) {
-               db_printf("No buf address\n");
-               return;
-       }
-       buf = (struct buf*) addr;
-       db_printf("buf %p:\nhash:%p vnbufs:%p freelist:%p actq next:%p\n",
-                 buf, buf->b_hash, buf->b_vnbufs, buf->b_freelist,
-                 BUFQ_NEXT(buf));
-       bitmask_snprintf(buf->b_flags, flagnames, sbuf, sizeof(sbuf));
-       db_printf("flags:%x => %s\n", buf->b_flags, sbuf);
-       db_printf("error:%x bufsiz:%x bcount:%x resid:%x dev:%x un.addr:%x\n",
-                 buf->b_error, buf->b_bufsize, buf->b_bcount, buf->b_resid,
-                 buf->b_dev, buf->b_data);
-       db_printf("saveaddr:%p lblkno:%x blkno:%x iodone:%x",
-                 buf->b_saveaddr, buf->b_lblkno, buf->b_blkno, buf->b_iodone);
-       db_printsym((long)buf->b_iodone, DB_STGY_PROC, db_printf);
-       db_printf("\nvp:%p dirtyoff:%x dirtyend:%x\n", buf->b_vp, buf->b_dirtyoff, buf->b_dirtyend);
-}
-
 #include <uvm/uvm.h>
 
 void db_uvmhistdump __P((db_expr_t, int, db_expr_t, char *));
@@ -887,7 +848,6 @@
 }
 
 struct db_command sparc_db_command_table[] = {
-       { "buf",        db_dump_buf,    0,      0 },
        { "ctx",        db_ctx_cmd,     0,      0 },
        { "dtlb",       db_dump_dtlb,   0,      0 },
        { "dtsb",       db_dump_dtsb,   0,      0 },



Home | Main Index | Thread Index | Old Index