You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/03/13 01:44:58 UTC
(nuttx) branch master updated: Revert "assert/panic: disable panic message to save the code size"
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 2b18917a6b Revert "assert/panic: disable panic message to save the code size"
2b18917a6b is described below
commit 2b18917a6b7a35b44c3448ef1f6a87caa13e4f90
Author: Tiago Medicci Serrano <ti...@gmail.com>
AuthorDate: Tue Mar 12 11:51:26 2024 -0300
Revert "assert/panic: disable panic message to save the code size"
This reverts commit 9b1c451f2f881077cd7d56f6496ea3c06ea30f17.
---
include/assert.h | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/assert.h b/include/assert.h
index d19d370a49..45d6e4d323 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -72,6 +72,10 @@
# define __ASSERT_LINE__ 0
#endif
+#define PANIC() __assert(__ASSERT_FILE__, __ASSERT_LINE__, "panic")
+#define PANIC_WITH_REGS(msg, regs) _assert(__ASSERT_FILE__, \
+ __ASSERT_LINE__, msg, regs)
+
#define __ASSERT__(f, file, line, _f) \
do \
{ \
@@ -97,9 +101,6 @@
#endif
#ifdef CONFIG_DEBUG_ASSERTIONS
-# define PANIC() __assert(__ASSERT_FILE__, __ASSERT_LINE__, "panic")
-# define PANIC_WITH_REGS(msg, regs) _assert(__ASSERT_FILE__, \
- __ASSERT_LINE__, msg, regs)
# define DEBUGPANIC() __assert(__DEBUG_ASSERT_FILE__, __DEBUG_ASSERT_LINE__, "panic")
# define DEBUGASSERT(f) _ASSERT(f, __DEBUG_ASSERT_FILE__, __DEBUG_ASSERT_LINE__)
# define DEBUGVERIFY(f) _VERIFY(f, __DEBUG_ASSERT_FILE__, __DEBUG_ASSERT_LINE__)
@@ -107,8 +108,6 @@
# define DEBUGPANIC()
# define DEBUGASSERT(f) ((void)(1 || (f)))
# define DEBUGVERIFY(f) ((void)(f))
-# define PANIC() do { } while (1)
-# define PANIC_WITH_REGS(msg, regs) PANIC()
#endif
/* The C standard states that if NDEBUG is defined, assert will do nothing.