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/xps

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: xps,v 1.5 2003/04/28 01:43:48 briggs Exp $
    2 
    3 # xps
    4 # kernel ps
    5 #
    6 #       @(#)xps 8.3 (Berkeley) 8/22/94
    7 
    8 define xps
    9 
   10         set $i = 0
   11 
   12         while ($i < 2)
   13 
   14                 if ($i == 0)
   15                         set $p = allproc.lh_first
   16                 end
   17                 if ($i == 1)
   18                         set $p = zombproc.lh_first
   19                         if ($p != 0)
   20                                 printf "Zombies:\n"
   21                         end
   22                 end
   23 
   24                 if ($p)
   25                         printf "              proc   pid     flag nlwps comm\n"
   26                         printf "\t\t  lwp      flag             wchan\n"
   27                 end
   28                 while ($p)
   29                         printf "%#18lx %5d %8x %2x %d         %s", \
   30                                 $p, $p->p_pid, \
   31                                 $p->p_flag, $p->p_stat, $p->p_nlwps, \
   32                                 (char *) $p->p_comm
   33                         printf "\n"
   34                         set $l = $p->p_lwps.lh_first
   35                         set $j = 0
   36                         while ($j < $p->p_nlwps)
   37                                 printf "\t\t%#08lx %3x %#18lx", \
   38                                         $l, $l->l_flag, $l->l_wchan
   39                                 if ($l->l_wmesg)
   40                                         printf " (%s)", (char *)$l->l_wmesg
   41                                 end
   42                                 set $l = $l->l_list.le_next
   43                                 printf "\n"
   44                                 set $j++
   45                         end
   46                         set $p = $p->p_list.le_next
   47                 end
   48                 set $i++
   49         end
   50 end

Cache object: cf574cbe2927bc2341e4a518e7137072


[ 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.