svn commit: r257214 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Sun Oct 27 16:20:52 UTC 2013
Author: kib
Date: Sun Oct 27 16:20:52 2013
New Revision: 257214
URL: http://svnweb.freebsd.org/changeset/base/257214
Log:
When reentering kdb, typically due to a bug causing trap or assert in
the code executed in the context of debugger, do not be ashamed to
inform loudly about the re-entry. Also, print the backtrace before
obliterating current stack with longjmp, allowing the operator to see
a place which caused the bug.
The change should make it less mysterious debugging the ddb itself.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/kern/subr_kdb.c
Modified: head/sys/kern/subr_kdb.c
==============================================================================
--- head/sys/kern/subr_kdb.c Sun Oct 27 16:18:48 2013 (r257213)
+++ head/sys/kern/subr_kdb.c Sun Oct 27 16:20:52 2013 (r257214)
@@ -503,6 +503,8 @@ kdb_reenter(void)
if (!kdb_active || kdb_jmpbufp == NULL)
return;
+ printf("KDB: reentering\n");
+ kdb_backtrace();
longjmp(kdb_jmpbufp, 1);
/* NOTREACHED */
}
More information about the svn-src-head
mailing list