summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_witness.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-12-25 17:52:02 +0000
committerrwatson <rwatson@FreeBSD.org>2007-12-25 17:52:02 +0000
commitbdee30611dab246a5227856892385a02c7352f12 (patch)
treeae45f86ab6fb75519ba2d9dbc206616dba84cc13 /sys/kern/subr_witness.c
parente3b63ab4174a215e3a606c591d7a3f41490e75e6 (diff)
downloadFreeBSD-src-bdee30611dab246a5227856892385a02c7352f12.zip
FreeBSD-src-bdee30611dab246a5227856892385a02c7352f12.tar.gz
Add a new 'why' argument to kdb_enter(), and a set of constants to use
for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r--sys/kern/subr_witness.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index 3019a7a..c5402c7 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -1123,7 +1123,7 @@ debugger:
if (witness_trace)
kdb_backtrace();
if (witness_kdb)
- kdb_enter(__func__);
+ kdb_enter(KDB_WHY_WITNESS, __func__);
#endif
}
@@ -1396,7 +1396,7 @@ witness_warn(int flags, struct lock_object *lock, const char *fmt, ...)
panic("witness_warn");
#ifdef KDB
else if (witness_kdb && n)
- kdb_enter(__func__);
+ kdb_enter(KDB_WHY_WITNESS, __func__);
else if (witness_trace && n)
kdb_backtrace();
#endif
OpenPOWER on IntegriCloud