From 33556f939fcf25b9d0c2ed53cce32997c610c8d2 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 17 Mar 2023 21:26:03 +0100 Subject: [PATCH] FpDebug: unrolling stack, using CFI - fixed address in stack-entry (do not subtract 1) --- components/fpdebug/fpdbgdwarfcfi.pas | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/fpdebug/fpdbgdwarfcfi.pas b/components/fpdebug/fpdbgdwarfcfi.pas index 6e167ea898..5a2065c1e0 100644 --- a/components/fpdebug/fpdbgdwarfcfi.pas +++ b/components/fpdebug/fpdbgdwarfcfi.pas @@ -718,10 +718,7 @@ begin Exit; end; - // We do not strace-back to the return address, we need the calling-address. - // This is difficult though. But we assume that ReturnAddress-1 is part of - // the instruction that made the call. - NewCallStackEntry := TDbgCallstackEntry.create(Thread, NextIdx, FrameBase, ReturnAddress-1); + NewCallStackEntry := TDbgCallstackEntry.create(Thread, NextIdx, FrameBase, ReturnAddress); // Fill other registers for i := 0 to High(Row.RegisterArray) do