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:
parent
5d76604145
commit
c2a445910d
@ -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 */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user