Home | History | Annotate | Line # | Download | only in gdbscripts
procs revision 1.1
      1 #	$NetBSD: procs,v 1.1 2008/02/20 20:56:35 ad 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 comm\n"
     12 		end
     13 		while ($p)
     14 			printf "%16lx %5d %8x %4x %5d %s", \
     15 				$p, $p->p_pid, \
     16 				$p->p_flag, $p->p_stat, $p->p_nlwps, \
     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
     24