summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-09-12 08:26:01 +0000
committerguenther <guenther@openbsd.org>2015-09-12 08:26:01 +0000
commit6a9c6616ffd684c102b0a1b7b33a517878f9f42e (patch)
treef6e073d6151d93b2cee8c7485efd4f9e3afb1f20
parentsync (diff)
downloadwireguard-openbsd-6a9c6616ffd684c102b0a1b7b33a517878f9f42e.tar.xz
wireguard-openbsd-6a9c6616ffd684c102b0a1b7b33a517878f9f42e.zip
When panicing, show the non-idle, on-proc threads before showing the stack
trace ok deraadt@ miod@ beck@
-rw-r--r--sys/ddb/db_trap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c
index 6883b612adc..2cb89d1dda7 100644
--- a/sys/ddb/db_trap.c
+++ b/sys/ddb/db_trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trap.c,v 1.20 2015/08/30 18:12:52 deraadt Exp $ */
+/* $OpenBSD: db_trap.c,v 1.21 2015/09/12 08:26:01 guenther Exp $ */
/* $NetBSD: db_trap.c,v 1.9 1996/02/05 01:57:18 christos Exp $ */
/*
@@ -70,6 +70,9 @@ db_trap(int type, int code)
db_print_loc_and_inst(db_dot);
if (panicstr != NULL) {
+ /* show on-proc threads */
+ db_show_all_procs(0, 0, 0, "o");
+ /* then the backtrace */
db_stack_trace_print(db_dot, 0, 10 /* arbitrary */, "",
db_printf);