From 8942f3ea4acf941ef963b8e67bf7a48b7e22ae49 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 6 Nov 2024 13:48:37 +0100 Subject: [PATCH] LazDebuggerFp: fix asm-step-over wrongly stops at finally block in nested code. Issue #41226 (cherry picked from commit 929c9e68caac3effbad8a45ffe13d3bddc03e118) --- components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas index cb6b00e8b2..0fcb565e47 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas @@ -3188,7 +3188,7 @@ begin Eax := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(0).NumValue; FAddressFrameListSehW32Finally.RemoveOutOfScopeFrames(EAX, FBreakPoints[bplSehW32Finally]); - if (ACurCommand is TDbgControllerLineStepBaseCmd) and + if (ACurCommand is TDbgControllerHiddenBreakStepBaseCmd) and not CheckCommandFinishesInFrame(Eax) then exit; @@ -3299,7 +3299,7 @@ begin if (not CurrentProcess.ReadAddress(R8 + 160, Base)) or (Base = 0) then // RPB at finally exit; - if ( (FState = esIgnoredRaise) or (ACurCommand is TDbgControllerLineStepBaseCmd) ) and + if ( (FState = esIgnoredRaise) or (ACurCommand is TDbgControllerHiddenBreakStepBaseCmd) ) and not CheckCommandFinishesInFrame(Base) then exit; @@ -3410,7 +3410,7 @@ begin FBreakPoints[bplSehW64Finally].RemoveAddress(PC); // At the start of a finally the BasePointer is in RCX // reg 2 - if (ACurCommand is TDbgControllerLineStepBaseCmd) and + if (ACurCommand is TDbgControllerHiddenBreakStepBaseCmd) and not CheckCommandFinishesInFrame(CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(2).NumValue) then exit;