Page MenuHomeFreeBSD

Unclutter ddb(4) error handling
ClosedPublic

Authored by trasz on Nov 23 2017, 12:53 PM.
Tags
None
Referenced Files
F137040251: D13212.id35767.diff
Fri, Nov 21, 1:00 AM
F137040031: D13212.id35916.diff
Fri, Nov 21, 1:00 AM
F137039844: D13212.id35659.diff
Fri, Nov 21, 12:59 AM
F137039715: D13212.id.diff
Fri, Nov 21, 12:59 AM
F137038223: D13212.diff
Fri, Nov 21, 12:56 AM
Unknown Object (File)
Sun, Nov 16, 7:50 AM
Unknown Object (File)
Sun, Nov 16, 2:34 AM
Unknown Object (File)
Wed, Oct 29, 5:05 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 Passed
Unit
No Test Coverage
Build Status
Buildable 13052
Build 13304: arc lint + arc unit

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
506

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.