aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2006-11-02 11:47:38 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2006-11-02 11:47:38 +0000
commit9641e3896639af5a28760765943173991f45930a (patch)
tree2b2a0faaebab8167ddc9d6da7ed4e7b404afec2d /sys/ddb
parent42db1b70c58698f10aa588e6c27e39f34dc5ce62 (diff)
downloadsrc-9641e3896639af5a28760765943173991f45930a.tar.gz
src-9641e3896639af5a28760765943173991f45930a.zip
Notes
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_command.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 98fd39a486c0..3614e4840090 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -690,14 +690,22 @@ db_stack_trace_all(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3,
{
struct proc *p;
struct thread *td;
+ jmp_buf jb;
+ void *prev_jb;
LIST_FOREACH(p, &allproc, p_list) {
- FOREACH_THREAD_IN_PROC(p, td) {
- db_printf("\nTracing command %s pid %d tid %ld td %p\n",
- p->p_comm, p->p_pid, (long)td->td_tid, td);
- db_trace_thread(td, -1);
- if (db_pager_quit)
- return;
+ prev_jb = kdb_jmpbuf(jb);
+ if (setjmp(jb) == 0) {
+ FOREACH_THREAD_IN_PROC(p, td) {
+ db_printf("\nTracing command %s pid %d tid %ld td %p\n",
+ p->p_comm, p->p_pid, (long)td->td_tid, td);
+ db_trace_thread(td, -1);
+ if (db_pager_quit) {
+ kdb_jmpbuf(prev_jb);
+ return;
+ }
+ }
}
+ kdb_jmpbuf(prev_jb);
}
}