summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2003-06-08 06:11:15 +0000
committergrog <grog@FreeBSD.org>2003-06-08 06:11:15 +0000
commitbdb8232f29e0189c9f6236c04240436aafae4eb5 (patch)
tree39afc1b247c9a16dd8629b8101519f1fa28259ab /tools
parent63d6633ce4d89e8c03b9ce894086b6d7becf5945 (diff)
downloadFreeBSD-src-bdb8232f29e0189c9f6236c04240436aafae4eb5.zip
FreeBSD-src-bdb8232f29e0189c9f6236c04240436aafae4eb5.tar.gz
Make defproc work.
Diffstat (limited to 'tools')
-rw-r--r--tools/debugscripts/gdbinit.kernel32
1 files changed, 18 insertions, 14 deletions
diff --git a/tools/debugscripts/gdbinit.kernel b/tools/debugscripts/gdbinit.kernel
index 51f4413..547f3e0 100644
--- a/tools/debugscripts/gdbinit.kernel
+++ b/tools/debugscripts/gdbinit.kernel
@@ -248,21 +248,25 @@ define defproc
set $pptr = $proc
end
set $myvectorproc = $proc
- if ($proc.p_stat)
- printf "%5d %08x %08x %4d %5d %5d %06x %d %-10s ", \
- $proc.p_pid, $aproc, \
- $proc.p_uarea, $proc.p_cred->p_ruid, $pptr->p_pid, \
- $proc.p_pgrp->pg_id, $proc.p_flag, $proc.p_stat, \
- &$proc.p_comm[0]
- if ($proc.p_wchan)
- if ($proc.p_wmesg)
- printf "%s ", $proc.p_wmesg
- end
- printf "%x", $proc.p_wchan
+ if ($proc.p_state)
+ set $thread = $proc->p_threads.tqh_first
+ while ($thread)
+ printf "%5d %08x %08x %4d %5d %5d %06x %d %-10s ", \
+ $proc.p_pid, $aproc, \
+ $proc.p_uarea, $proc.p_ucred->cr_ruid, $pptr->p_pid, \
+ $proc.p_pgrp->pg_id, $proc.p_flag, $proc.p_state, \
+ &$proc.p_comm[0]
+ if ($thread.td_wchan)
+ if ($thread.td_wmesg)
+ printf "%s ", $thread.td_wmesg
+ end
+ printf "%x", $thread.td_wchan
+ end
+ printf "\n"
+ set $thread = $thread->td_plist.tqe_next
end
- printf "\n"
- end
- btpp
+ end
+ btpp
set $nproc = 0
else
set $proc = $proc.p_list.le_next
OpenPOWER on IntegriCloud