提交 809db71a 编写于 作者: Z zhangdengyu

feat:Panic支持ExcHook

方案描述:
1、在EXC_TYPE枚举中添加EXC_PANIC成员用于Panic支持ExcHook
2、在LOS_Panic接口执行异常处理钩子函数

BREAKING CHANGE:
无

Close: #I6GR6G
Signed-off-by: Nzhangdengyu <zhangdengyu2@huawei.com>
Change-Id: I99d293622ff6ddbc49348c692512e5b7780460e6
上级 2cadd653
...@@ -114,6 +114,7 @@ LITE_OS_SEC_TEXT_INIT VOID LOS_Panic(const CHAR *fmt, ...) ...@@ -114,6 +114,7 @@ LITE_OS_SEC_TEXT_INIT VOID LOS_Panic(const CHAR *fmt, ...)
va_start(ap, fmt); va_start(ap, fmt);
PRINT_ERR(fmt, ap); PRINT_ERR(fmt, ap);
va_end(ap); va_end(ap);
OsDoExcHook(EXC_PANIC);
#if (LOSCFG_BACKTRACE_TYPE != 0) #if (LOSCFG_BACKTRACE_TYPE != 0)
LOS_BackTrace(); LOS_BackTrace();
#endif #endif
......
...@@ -74,6 +74,7 @@ typedef struct { ...@@ -74,6 +74,7 @@ typedef struct {
typedef enum { typedef enum {
EXC_REBOOT, EXC_REBOOT,
EXC_ASSERT, EXC_ASSERT,
EXC_PANIC,
EXC_STACKOVERFLOW, EXC_STACKOVERFLOW,
EXC_INTERRUPT, EXC_INTERRUPT,
EXC_TYPE_END EXC_TYPE_END
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册