Page MenuHomeFreeBSD

Unclutter ddb(4) error handling
ClosedPublic

Authored by trasz on Nov 23 2017, 12:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 17 2024, 10:06 AM
Unknown Object (File)
Oct 17 2024, 10:05 AM
Unknown Object (File)
Oct 17 2024, 10:05 AM
Unknown Object (File)
Oct 17 2024, 10:05 AM
Unknown Object (File)
Oct 17 2024, 9:34 AM
Unknown Object (File)
Oct 2 2024, 8:31 AM
Unknown Object (File)
Oct 1 2024, 6:43 AM
Unknown Object (File)
Sep 30 2024, 1:46 AM
Subscribers

Details

Summary

Make kdb_reenter() silent when explicitly called from db_error(). This removes
the useless backtrace on various ddb(4) user errors.

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.

Use kdb_reenter_silent() instead of an additional variable.

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.

This revision is now accepted and ready to land.Nov 27 2017, 7:35 PM
This revision was automatically updated to reflect the committed changes.