[BACK]Return to procs CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / gdbscripts

File: [cvs.NetBSD.org] / src / sys / gdbscripts / procs (download)

Revision 1.4, Thu May 9 07:59:49 2019 UTC (21 months, 2 weeks ago) by mrg
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache, HEAD
Changes since 1.3: +6 -1 lines

document 'devs' and 'procs' commands.

#	$NetBSD: procs,v 1.4 2019/05/09 07:59:49 mrg Exp $

define procs
	set $i = 0

	while ($i < 2)
		if ($i == 0)
			set $p = allproc.lh_first
		end
		if ($p)
			printf "            proc   pid     flag stat nlwps            lwp  comm\n"
		end
		while ($p)
			printf "%16lx %5d %8x %4x %5d %16lx %s\n", \
				$p, $p->p_pid, \
				$p->p_flag, $p->p_stat, $p->p_nlwps, $p->p_lwps.lh_first, \
				(char *) $p->p_comm
			set $p = $p->p_list.le_next
		end
		set $i++
	end
end
document procs
list all processes.
displays struct proc *, pid, flags, status, nlwps, first lwp addr
and command name.
end