Module Name:    src
Committed By:   eeh
Date:           Wed Nov 18 18:04:26 UTC 2009

Modified Files:
        src/sys/gdbscripts: vchain

Log Message:
Print out all 64-bits of 64-bit values on 64-bit machines and add documentation
of these commands to gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/gdbscripts/vchain

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/gdbscripts/vchain
diff -u src/sys/gdbscripts/vchain:1.5 src/sys/gdbscripts/vchain:1.6
--- src/sys/gdbscripts/vchain:1.5	Sat Nov  4 20:33:17 2006
+++ src/sys/gdbscripts/vchain	Wed Nov 18 18:04:26 2009
@@ -1,32 +1,39 @@
-#	$NetBSD: vchain,v 1.5 2006/11/04 20:33:17 pooka Exp $
+#	$NetBSD: vchain,v 1.6 2009/11/18 18:04:26 eeh Exp $
 
 #	@(#)vchain	8.1 (Berkeley) 6/10/93
 #
-# Given a vnode, follow its mount pointers
+
 define vchain
 	set $num = 0
 
 	set $vp=(struct vnode *)$arg0
 	while ($vp)
-		printf "vp: 0x%x freelist_next: 0x%x usecount: %d flags: 0x%x\n", $vp, $vp->v_freelist.tqe_next, $vp->v_uobj.uo_refs, $vp->v_flag
+		printf "vp: 0x%lx freelist_next: 0x%lx usecount: %d flags: i:0x%x v:0x%x u:0x%x\n",\
+		       $vp, $vp->v_freelist.tqe_next, $vp->v_uobj.uo_refs, \
+		       $vp->v_iflag, $vp->v_vflag, $vp->v_uflag
 		set $num++
 		set $vp = $vp->v_mntvnodes.tqe_next
 	end
 	printf "Number of vnodes: %d\n", $num
 end
 
+document vchain
+Given a vnode, follow its mount pointers
+end
+
 define vprint
 	set $vp=(struct vnode *)$arg0
 	set $ip=(struct inode *)$vp->v_data
 end
 
-# print the vnode chain for a given mount point
 define mp_vchain
 	set $mp = (struct mount *)$arg0
 	vchain $mp->mnt_vnodelist.tqh_first
 end
+document mp_vchain
+print the vnode chain for a given mount point
+end
 
-# print vnode chains for all mount points
 define vall
 	set $mp=mountlist.cqh_first
 	while ($mp)
@@ -40,6 +47,9 @@
 		end
 	end
 end
+document vall
+print vnode chains for all mount points
+end
 
 define mountdump
 	set $mp=mountlist.cqh_first
@@ -52,3 +62,4 @@
 			set $mp = 0
 		end
 	end
+end
\ No newline at end of file

Reply via email to