From f39025ab189655bc1ac37a8682932e5821691378 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 f2cd7da5d2..5a6d145621 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas @@ -3089,7 +3089,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; @@ -3200,7 +3200,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; @@ -3312,7 +3312,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;