aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/kdb.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2018-11-01 21:34:17 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2018-11-01 21:34:17 +0000
commitb317cfd4c0d102045ef84dc045141de416f9d808 (patch)
tree8ab914cfffa0adff6cc4cd2b493ecb220ba9cd02 /sys/sys/kdb.h
parent921540789b250c1488b35d476ae0d71389c6a576 (diff)
downloadsrc-b317cfd4c0d102045ef84dc045141de416f9d808.tar.gz
src-b317cfd4c0d102045ef84dc045141de416f9d808.zip
Don't enter DDB for fatal traps before panic by default.
Add a new 'debugger_on_trap' knob separate from 'debugger_on_panic' and make the calls to kdb_trap() in MD fatal trap handlers prior to calling panic() conditional on this new knob instead of 'debugger_on_panic'. Disable the new knob by default. Developers who wish to recover from a fatal fault by adjusting saved register state and retrying the faulting instruction can still do so by enabling the new knob. However, for the more common case this makes the user experience for panics due to a fatal fault match the user experience for other panics, e.g. 'c' in DDB will generate a crash dump and reboot the system rather than being stuck in an infinite loop of fatal fault messages and DDB prompts. Reviewed by: kib, avg MFC after: 2 months Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D17768
Notes
Notes: svn path=/head/; revision=340020
Diffstat (limited to 'sys/sys/kdb.h')
-rw-r--r--sys/sys/kdb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h
index 8834b0fa8172..75f8343b8428 100644
--- a/sys/sys/kdb.h
+++ b/sys/sys/kdb.h
@@ -62,7 +62,7 @@ struct kdb_dbbe {
DATA_SET(kdb_dbbe_set, name##_dbbe)
extern u_char kdb_active; /* Non-zero while in debugger. */
-extern int debugger_on_panic; /* enter the debugger on panic. */
+extern int debugger_on_trap; /* enter the debugger on trap. */
extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */
extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */
extern struct pcb *kdb_thrctx; /* Current context. */