!195 clang编译的系统镜像内核栈回溯功能失效
Merge pull request !195 from zhangfanfan2/OpenHarmony_1.0.1_release
This commit is contained in:
commit
7cf342c29f
|
@ -669,12 +669,21 @@ VOID BackTraceSub(UINTPTR regFP)
|
||||||
|
|
||||||
while (IsValidFP(backFP, stackStart, stackEnd, &kvaddr) == TRUE) {
|
while (IsValidFP(backFP, stackStart, stackEnd, &kvaddr) == TRUE) {
|
||||||
tmpFP = backFP;
|
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;
|
backLR = *(UINTPTR *)(UINTPTR)kvaddr;
|
||||||
if (IsValidFP(tmpFP - POINTER_SIZE, stackStart, stackEnd, &kvaddr) == FALSE) {
|
if (IsValidFP(tmpFP - POINTER_SIZE, stackStart, stackEnd, &kvaddr) == FALSE) {
|
||||||
PrintExcInfo("traceback backFP check failed, backFP: 0x%x\n", tmpFP - POINTER_SIZE);
|
PrintExcInfo("traceback backFP check failed, backFP: 0x%x\n", tmpFP - POINTER_SIZE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
backFP = *(UINTPTR *)(UINTPTR)kvaddr;
|
backFP = *(UINTPTR *)(UINTPTR)kvaddr;
|
||||||
|
#endif
|
||||||
if (LOS_IsUserAddress((VADDR_T)backLR) == TRUE) {
|
if (LOS_IsUserAddress((VADDR_T)backLR) == TRUE) {
|
||||||
region = LOS_RegionFind(OsCurrProcessGet()->vmSpace, (VADDR_T)backLR);
|
region = LOS_RegionFind(OsCurrProcessGet()->vmSpace, (VADDR_T)backLR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue