The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/gdbscripts/vchain

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #       $NetBSD: vchain,v 1.5 2006/11/04 20:33:17 pooka Exp $
    2 
    3 #       @(#)vchain      8.1 (Berkeley) 6/10/93
    4 #
    5 # Given a vnode, follow its mount pointers
    6 define vchain
    7         set $num = 0
    8 
    9         set $vp=(struct vnode *)$arg0
   10         while ($vp)
   11                 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
   12                 set $num++
   13                 set $vp = $vp->v_mntvnodes.tqe_next
   14         end
   15         printf "Number of vnodes: %d\n", $num
   16 end
   17 
   18 define vprint
   19         set $vp=(struct vnode *)$arg0
   20         set $ip=(struct inode *)$vp->v_data
   21 end
   22 
   23 # print the vnode chain for a given mount point
   24 define mp_vchain
   25         set $mp = (struct mount *)$arg0
   26         vchain $mp->mnt_vnodelist.tqh_first
   27 end
   28 
   29 # print vnode chains for all mount points
   30 define vall
   31         set $mp=mountlist.cqh_first
   32         while ($mp)
   33                 printf "\tmount point at 0x%x\n", $mp
   34                 mp_vchain $mp
   35                 set $mp=$mp->mnt_list.cqe_next
   36 
   37                 # "break"
   38                 if ((const void *)$mp == (const void *)&mountlist)
   39                         set $mp = 0
   40                 end
   41         end
   42 end
   43 
   44 define mountdump
   45         set $mp=mountlist.cqh_first
   46         while ($mp)
   47                 printf "%s on %s type %s, (mp 0x%x, privdata 0x%x)\n", \
   48                     $mp->mnt_stat->f_mntfromname, $mp->mnt_stat->f_mntonname, \
   49                     $mp->mnt_op->vfs_name, $mp, $mp->mnt_data
   50                 set $mp=$mp->mnt_list.cqe_next
   51                 if ((const void *)$mp == (const void *)&mountlist)
   52                         set $mp = 0
   53                 end
   54         end

Cache object: 281892e4406a56d503c70b073ed0687d


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.