Page MenuHomeFreeBSD

Add DDB to opt_ddb.h
AbandonedPublic

Authored by zbb on Nov 2 2015, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 28 2024, 6:32 AM
Unknown Object (File)
Nov 16 2024, 5:52 AM
Unknown Object (File)
Oct 17 2024, 9:58 PM
Unknown Object (File)
Oct 16 2024, 2:06 AM
Unknown Object (File)
Oct 16 2024, 2:05 AM
Unknown Object (File)
Oct 16 2024, 2:05 AM
Unknown Object (File)
Sep 29 2024, 3:10 AM
Unknown Object (File)
Sep 26 2024, 2:08 AM
Subscribers

Details

Summary

Some DDB related files (i.e. armv6 debug_monitor.c) should not
be compiled-in when DDB is disabled but on the other hand stub
replacements are supposed to be called.
This patch allows for compilation time inclusion/exclusion of the above
mentioned code.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

zbb retitled this revision from to Add DDB to opt_ddb.h.
zbb updated this object.
zbb edited the test plan for this revision. (Show Details)
zbb added reviewers: andrew, wma_semihalf.com, ian, imp.
zbb set the repository for this revision to rS FreeBSD src repository - subversion.
zbb added a subscriber: ARM.
imp requested changes to this revision.Nov 5 2015, 3:10 PM
imp edited edge metadata.

You break these files, which don't currently include opt_ddb.h, but
do have #ifdef DDB in them:
sys/arm/arm/pmap-v6.c
sys/arm/arm/pmap.c
sys/arm64/arm64/trap.c

And may break files that include these widely included files.

sys/sys/cpuset.h
sys/sys/interrupt.h
sys/sys/lockmgr.h
sys/sys/sx.h

Though it looks like the right answer for those is to simply remove the #ifdef DDB
block and always declare the function. The linker will throw an error if someone
is calling the function w/o properly including DDB in the kernel. I believe that's
already the case, but haven't audited it beyond looking at the first two files closely.
It's generally bad form to have #ifdef based on options in the .h files in the kernel
anyway, especially for widely included stuff.

This revision now requires changes to proceed.Nov 5 2015, 3:10 PM