mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 21:20:26 +08:00
debug/assert: decouple configuration of show file name feature
add new config CONFIG_ASSERTIONS_FILENAME to library call assert(3) to decouple with CONFIG_DEBUG_ASSERTIONS | Function |CONFIG | Show filename/line | | --- | --- | --- | |assert(), ASSERT()|CONFIG_ASSERTIONS_FILENAME=y | Yes | |assert(), ASSERT()|CONFIG_ASSERTIONS_FILENAME=n | No | |DEBUGASSERT() |CONFIG_DEBUG_ASSERTIONS_FILENAME=y| Yes | |DEBUGASSERT() |CONFIG_DEBUG_ASSERTIONS_FILENAME=n| No | Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
9
Kconfig
9
Kconfig
@@ -638,6 +638,15 @@ config NDEBUG
|
||||
bool "Define NDEBUG globally"
|
||||
default !DEBUG_ASSERTIONS
|
||||
|
||||
config ASSERTIONS_FILENAME
|
||||
bool "Enable library call assert(3) show the file name"
|
||||
default DEBUG_ASSERTIONS_FILENAME || !DEFAULT_SMALL
|
||||
depends on !NDEBUG
|
||||
---help---
|
||||
This option can display the file information of the library call assert(3)
|
||||
function when it is enabled. This option maybe will take up a lot
|
||||
of space from applications.
|
||||
|
||||
config DEBUG_ALERT
|
||||
bool
|
||||
default n
|
||||
|
||||
Reference in New Issue
Block a user