NetBSD/sys/gdbscripts/vchain

31 lines
592 B
Plaintext

# $NetBSD: vchain,v 1.2 1997/02/12 23:35:10 gwr 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 freef: 0x%x usecount: %d flags: 0x%x\n", $vp, $vp->v_freef, $vp->v_usecount, $vp->v_flag
set $num++
set $vp = $vp->v_mountf
end
printf "Number of vnodes: %d\n", $num
end
define vprint
set $vp=(struct vnode *)$arg0
set $ip=(struct inode *)$vp->v_data
end
define vall
set $mp=rootfs
while ($mp)
vchain $mp->mnt_mounth
set $mp=$mp->mnt_next
end
end