NetBSD/sys/gdbscripts/xps

35 lines
594 B
Plaintext

# $NetBSD: xps,v 1.3 1997/04/16 00:58:26 cgd Exp $
# xps
# kernel ps
#
# @(#)xps 8.3 (Berkeley) 8/22/94
define xps
set $i = 0
while ($i < 2)
if ($i == 0)
set $p = allproc.lh_first
end
if ($i == 1)
set $p = zombproc.lh_first
end
printf " proc pid flag st wchan comm\n"
while ($p)
printf "%#18lx %5d %8x %2x %#18lx %s", $p, $p->p_pid, \
$p->p_flag, $p->p_stat, $p->p_wchan, \
(char *) $p->p_comm
if ($p->p_wmesg)
printf " (%s)", $p->p_wmesg
end
printf "\n"
set $p = $p->p_list.le_next
end
set $i++
end
end