提交 0507b9e8 编写于 作者: O openharmony_ci 提交者: Gitee

!654 内核ERR打印,无进程和线程信息,不方便问题定位

Merge pull request !654 from zhangfanfan2/master
......@@ -36,6 +36,7 @@
#endif
#include "los_hwi.h"
#include "los_memory_pri.h"
#include "los_process_pri.h"
#ifdef LOSCFG_FS_VFS
#include "console.h"
#endif
......@@ -47,7 +48,6 @@
#endif
#include "los_exc_pri.h"
#define SIZEBUF 256
const CHAR *g_logString[] = {
......@@ -278,7 +278,9 @@ VOID LOS_LkPrint(INT32 level, const CHAR *func, INT32 line, const CHAR *fmt, ...
}
if ((level != LOS_COMMON_LEVEL) && ((level > LOS_EMG_LEVEL) && (level <= LOS_TRACE_LEVEL))) {
dprintf("[%s]", g_logString[level]);
dprintf("[%s][%s:%s]", g_logString[level],
((OsCurrProcessGet() == NULL) ? "NULL" : OsCurrProcessGet()->processName),
((OsCurrTaskGet() == NULL) ? "NULL" : OsCurrTaskGet()->taskName));
}
va_start(ap, fmt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册