Make kdb_reenter() silent when explicitly called from db_error(). This removes
the useless backtrace on various ddb(4) user errors.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I'm not a fan of the global variable side effect. I would rather add a silent arg to kdb_reenter(). If there are lots of other callers then one way of handling this is to have a new 'kdb_reenter_silent()' function. It could either be standalone, or you could have a '_kdb_reenter(bool silent)' function and have kdb_reenter() and kdb_reenter_silent() be simpler wrappers.
sys/kern/subr_kdb.c | ||
---|---|---|
505 ↗ | (On Diff #35659) | This should be in an else clause. Right now kdb_reenter_silent is sticky in that it stays set forever once it is set. |
Thanks. Not sure why I went with the additional variable, tbh. Also, there are a few other calls to kdb_enter(), so I think adding a separate kdb_enter_silent() is nicer, especially regarding that it's a pretty small function and doesn't really need a wrapper.