Home | History | Annotate | Line # | Download | only in gdbscripts
procs revision 1.1.10.2
      1  1.1.10.2  matt #	$NetBSD: procs,v 1.1.10.2 2008/03/23 02:04:57 matt Exp $
      2  1.1.10.2  matt 
      3  1.1.10.2  matt define procs
      4  1.1.10.2  matt 	set $i = 0
      5  1.1.10.2  matt 
      6  1.1.10.2  matt 	while ($i < 2)
      7  1.1.10.2  matt 		if ($i == 0)
      8  1.1.10.2  matt 			set $p = allproc.lh_first
      9  1.1.10.2  matt 		end
     10  1.1.10.2  matt 		if ($p)
     11  1.1.10.2  matt 			printf "            proc   pid     flag stat nlwps comm\n"
     12  1.1.10.2  matt 		end
     13  1.1.10.2  matt 		while ($p)
     14  1.1.10.2  matt 			printf "%16lx %5d %8x %4x %5d %s", \
     15  1.1.10.2  matt 				$p, $p->p_pid, \
     16  1.1.10.2  matt 				$p->p_flag, $p->p_stat, $p->p_nlwps, \
     17  1.1.10.2  matt 				(char *) $p->p_comm
     18  1.1.10.2  matt 			printf "\n"
     19  1.1.10.2  matt 			set $p = $p->p_list.le_next
     20  1.1.10.2  matt 		end
     21  1.1.10.2  matt 		set $i++
     22  1.1.10.2  matt 	end
     23  1.1.10.2  matt end
     24