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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257214
@ -503,6 +503,8 @@ kdb_reenter(void)
|
|||||||
if (!kdb_active || kdb_jmpbufp == NULL)
|
if (!kdb_active || kdb_jmpbufp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
printf("KDB: reentering\n");
|
||||||
|
kdb_backtrace();
|
||||||
longjmp(kdb_jmpbufp, 1);
|
longjmp(kdb_jmpbufp, 1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user