diff options
| author | mrg <mrg@NetBSD.org> | 2019-12-06 02:37:53 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2019-12-06 02:37:53 +0000 |
| commit | ca17814744c0a8590a66f709f09b2ddcca06e253 (patch) | |
| tree | b1af9704c57dbc71e5ca538ab8d8ece8c556a4cc /sys/gdbscripts | |
| parent | 7385c9d97a917c323399802480472a9fb201433e (diff) | |
more updates for the vnode and mount list iterator changes
that happened a while back. also, port to 64 bit properly.
now these all appear to work again.
Diffstat (limited to 'sys/gdbscripts')
| -rw-r--r-- | sys/gdbscripts/vchain | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/sys/gdbscripts/vchain b/sys/gdbscripts/vchain index 3bf312047d9..7db54c9f267 100644 --- a/sys/gdbscripts/vchain +++ b/sys/gdbscripts/vchain @@ -1,4 +1,4 @@ -# $NetBSD: vchain,v 1.10 2019/12/06 01:01:02 mrg Exp $ +# $NetBSD: vchain,v 1.11 2019/12/06 02:37:53 mrg Exp $ # @(#)vchain 8.1 (Berkeley) 6/10/93 # @@ -6,14 +6,15 @@ define vchain set $num = 0 - set $vp=(struct vnode *)$arg0 - set $vi=(struct vnode_impl *)$arg0 - while ($vp) - printf "vp: 0x%lx lrulist_next: 0x%lx usecount: %d flags: i:0x%x v:0x%x u:0x%x\n",\ - $vp, $vi->vi_lrulist.tqe_next, $vp->v_uobj.uo_refs, \ + set $vi = (struct vnode_impl *)$arg0 + printf "lrulist_next: 0x%lx\n", $vi->vi_lrulist.tqe_next + while ($vi) + set $vp = &$vi->vi_vnode + printf "vp: 0x%lx usecount: %d flags: i:0x%x v:0x%x u:0x%x\n",\ + $vp, $vp->v_uobj.uo_refs, \ $vp->v_iflag, $vp->v_vflag, $vp->v_uflag set $num++ - set $vp = $vp->v_mntvnodes.tqe_next + set $vi = $vi->vi_mntvnodes.tqe_next end printf "Number of vnodes: %d\n", $num end @@ -28,23 +29,26 @@ define vprint end define mp_vchain - set $mp = (struct mount *)$arg0 - vchain $mp->mnt_vnodelist.tqh_first + set $mp = $arg0->me_mount + set $first = $mp->mnt_vnodelist.tqh_first + if ($first) + vchain $mp->mnt_vnodelist.tqh_first + end end document mp_vchain print the vnode chain for a given mount point end define vall - set $mp=mountlist.tqh_first - while ($mp) - printf "\tmount point at 0x%x\n", $mp - mp_vchain $mp - set $mp=$mp->mnt_list.tqe_next + set $mpe=mountlist.tqh_first + while ($mpe) + printf "\tmount point at 0x%lx\n", $mpe + mp_vchain $mpe + set $mpe = $mpe->me_list.tqe_next # "break" - if ((const void *)$mp == (const void *)&mountlist) - set $mp = 0 + if ((const void *)$mpe == (const void *)&mountlist) + set $mpe = 0 end end end @@ -57,7 +61,7 @@ define mountdump while ($me) if ($me->me_type == ME_MOUNT) set $mp = $me->me_mount - printf "%s on %s type %s, (mp 0x%x, privdata 0x%x)\n", \ + printf "%s on %s type %s, (mp 0x%lx, privdata 0x%lx)\n", \ $mp->mnt_stat->f_mntfromname, \ $mp->mnt_stat->f_mntonname, \ $mp->mnt_op->vfs_name, $mp, $mp->mnt_data |
