diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2006-11-02 11:47:38 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2006-11-02 11:47:38 +0000 |
commit | 9641e3896639af5a28760765943173991f45930a (patch) | |
tree | 2b2a0faaebab8167ddc9d6da7ed4e7b404afec2d /sys/ddb | |
parent | 42db1b70c58698f10aa588e6c27e39f34dc5ce62 (diff) | |
download | src-9641e3896639af5a28760765943173991f45930a.tar.gz src-9641e3896639af5a28760765943173991f45930a.zip |
Notes
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_command.c | 20 |
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); } } |