Most code assumes db_error does not return, but according to
kdb_reenter_silent, there may be cases where it could. Instead, panic
if kdb_reenter_silent returns and mark the routine as __dead2. This
addresses gcc warnings.
Details
Details
- Reviewers
kib rgrimes - Commits
- rGf0a7df4a6cc9: ddb: make db_error reliably no-return
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
It seems that db_error() is the only caller of kdb_reenter_silent(). And then it might be better to panic in kdb_reenter_silent() instead, I am not sure. [To make kdb_reenter_silent() more strict]
Comment Actions
I waffled on that. It seems like kdb_reenter_silent() was meant to be a version of kdb_reenter() without the prints, and kdb_reenter() has other callers... I also wondered if both kdb_reenter() and kdb_reenter_silent() should be no-return / panic. It seems the major difference would be whether we continue after not handling a trap when kdb_active but no kdb_jmpbufp is set. (Is that actually what we want? How does the happen? I'm unsure.) I went with just modifying db_error() as a change with less potential fallout.