From d2e204450a32d55933f130860601b54873a42689 Mon Sep 17 00:00:00 2001 From: cs1111 Date: Tue, 24 Jun 2025 10:45:57 +0800 Subject: [PATCH] fix:unwind context problem Signed-off-by: cs1111 Change-Id: I7dae57994e8183becc50c456ed3bfb73128b384c --- interfaces/innerkits/unwinder/unwinder.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/interfaces/innerkits/unwinder/unwinder.cpp b/interfaces/innerkits/unwinder/unwinder.cpp index f4169a74e..d8687fb5f 100644 --- a/interfaces/innerkits/unwinder/unwinder.cpp +++ b/interfaces/innerkits/unwinder/unwinder.cpp @@ -1382,10 +1382,7 @@ bool Unwinder::Impl::GetLockInfo(int32_t tid, char* buf, size_t sz) uintptr_t lockPtrAddr = firstFrameSp_ + 64; // 64 : sp + 0x40 uintptr_t lockAddr; - UnwindContext context; - context.pid = tid; - memory_->SetCtx(&context); - if (!memory_->ReadMem(lockPtrAddr, &lockAddr)) { + if (ReadProcMemByPid(tid, lockPtrAddr, &lockAddr, sizeof(uintptr_t)) != sizeof(uintptr_t)) { DFXLOGW("Failed to find lock addr."); return false; } -- Gitee