mirror of
https://github.com/opnsense/src.git
synced 2026-02-03 20:49:35 -05:00
Support enabling debugging macros for userland and _STANDALONE builds, in addition to the already existing kernel support. On runtime error, panic() is used for kernel and _STANDALONE builds, and a simple fprintf() + abort() combination for userland ones. These can be overriden if needed by defining the QMD_PANIC() and/or QMD_ASSERT() macros. The expansion of queue debug macros can now be controlled more finely thanks to the QUEUE_MACRO_DEBUG_ASSERTIONS and QUEUE_MACRO_NO_DEBUG_ASSERTIONS macros. The first one serves to forcibly enable debug code and the second to forcibly disable it. These are meant to be used as compile options only, and should normally not be defined in a source file. It is an error to have both of them defined. If none of the two above-mentioned macros are defined, an automatic determination is performed. When compiling kernel code, QUEUE_MACRO_DEBUG_ASSERTIONS is defined if INVARIANTS has been defined (as before). For userland and _STANDALONE builds, no debug code is ever automatically inserted even if NDEBUG is not defined, as doing so would inflate code size and users may want to have working assert() calls without this overhead by default. In the manual page, document check code control under DIAGNOSTICS. While here, rework a bit the rest of the DIAGNOSTICS section. Reviewed by: markj (older version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49973 (cherry picked from commit 1c5fea9e8b563186b8f5773064458c4ecf2d7004) |
||
|---|---|---|
| .. | ||
| colldef | ||
| colldef_unicode | ||
| ctypedef | ||
| dict | ||
| doc | ||
| dtrace | ||
| examples | ||
| i18n | ||
| keys | ||
| man | ||
| misc | ||
| mk | ||
| monetdef | ||
| monetdef_unicode | ||
| msgdef | ||
| msgdef_unicode | ||
| numericdef | ||
| numericdef_unicode | ||
| security | ||
| sendmail | ||
| skel | ||
| snmp | ||
| syscons | ||
| tabset | ||
| termcap | ||
| tests | ||
| timedef | ||
| vt | ||
| zoneinfo | ||
| Makefile | ||
| Makefile.inc | ||