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

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: procs,v 1.4 2019/05/09 07:59:49 mrg Exp $
    2 
    3 define procs
    4         set $i = 0
    5 
    6         while ($i < 2)
    7                 if ($i == 0)
    8                         set $p = allproc.lh_first
    9                 end
   10                 if ($p)
   11                         printf "            proc   pid     flag stat nlwps            lwp  comm\n"
   12                 end
   13                 while ($p)
   14                         printf "%16lx %5d %8x %4x %5d %16lx %s\n", \
   15                                 $p, $p->p_pid, \
   16                                 $p->p_flag, $p->p_stat, $p->p_nlwps, $p->p_lwps.lh_first, \
   17                                 (char *) $p->p_comm
   18                         set $p = $p->p_list.le_next
   19                 end
   20                 set $i++
   21         end
   22 end
   23 document procs
   24 list all processes.
   25 displays struct proc *, pid, flags, status, nlwps, first lwp addr
   26 and command name.
   27 end

Cache object: c2d617ce30096d67172a69514d4137e2


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