提交 3b9ccc83 编写于 作者: Y YOUR_NAME

fix:solve the problem of stack backtrace failure for llvm.

Change-Id: I0b0426e0e529cb6517d6a2712c6862ebbcea2239
上级 4f1e1619
......@@ -669,12 +669,21 @@ VOID BackTraceSub(UINTPTR regFP)
while (IsValidFP(backFP, stackStart, stackEnd, &kvaddr) == TRUE) {
tmpFP = backFP;
#ifdef LOSCFG_COMPILER_CLANG_LLVM
backFP = *(UINTPTR *)(UINTPTR)kvaddr;
if (IsValidFP(tmpFP + POINTER_SIZE, stackStart, stackEnd, &kvaddr) == FALSE) {
PrintExcInfo("traceback backLR check failed, backLP: 0x%x\n", tmpFP + POINTER_SIZE);
return;
}
backLR = *(UINTPTR *)(UINTPTR)kvaddr;
#else
backLR = *(UINTPTR *)(UINTPTR)kvaddr;
if (IsValidFP(tmpFP - POINTER_SIZE, stackStart, stackEnd, &kvaddr) == FALSE) {
PrintExcInfo("traceback backFP check failed, backFP: 0x%x\n", tmpFP - POINTER_SIZE);
return;
}
backFP = *(UINTPTR *)(UINTPTR)kvaddr;
#endif
if (LOS_IsUserAddress((VADDR_T)backLR) == TRUE) {
region = LOS_RegionFind(OsCurrProcessGet()->vmSpace, (VADDR_T)backLR);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册