NetBSD/sys/gdbscripts/xps

33 lines
526 B
Plaintext

# 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 "%#10x %5d %8x %2x %#10x %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