No empty .Rs/.Re
[netbsd-mini2440.git] / sys / gdbscripts / procs
blob089c794616bc64bdad95e46d9d274b245d37e078
1 #       $NetBSD: procs,v 1.1 2008/02/20 20:56:35 ad Exp $
3 define procs
4         set $i = 0
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", \
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                         printf "\n"
19                         set $p = $p->p_list.le_next
20                 end
21                 set $i++
22         end
23 end