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
This commit is contained in:
Konstantin Belousov 2013-10-27 16:20:52 +00:00
parent 5d76604145
commit c2a445910d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257214

View File

@ -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 */
}