NetBSD/sys/gdbscripts/xps
cgd faccc00a5a widen proc pointer and wchan pointer fields from 10 to 18 characters, so
that pointers on 64-bit systems are printed properly.  This means that
there'll be a lot of extra space on 32-bit systems, but gdb's printf doesn't
support * for width or precision specifiers, so it can't really be done much
better.
1997-04-16 00:58:26 +00:00

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