mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
assert: Distinguish between assert and exception
CURRENT_REGS may change during assert handling, so pass in the 'regs' parameter at the entry point of _assert. Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
+3
-1
@@ -48,6 +48,7 @@
|
||||
#endif
|
||||
|
||||
#define PANIC() __assert(__FILE__, __LINE__, "panic")
|
||||
#define PANIC_WITH_REGS(msg, regs) _assert(__FILE__, __LINE__, msg, regs)
|
||||
|
||||
#ifdef CONFIG_DEBUG_ASSERTIONS_EXPRESSION
|
||||
# define ASSERT(f) \
|
||||
@@ -152,7 +153,8 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void _assert(FAR const char *filename, int linenum, FAR const char *msg);
|
||||
void _assert(FAR const char *filename, int linenum,
|
||||
FAR const char *msg, FAR void *regs);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: __assert
|
||||
|
||||
Reference in New Issue
Block a user