mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-25 23:09:13 +02:00
LazDebuggerGdbmi: Win64-SEH, fix stepping out of finally block, if the block was entered without exception
git-svn-id: trunk@62333 -
This commit is contained in:
parent
c22ac41cb7
commit
f8622385f7
@ -7033,6 +7033,12 @@ var
|
|||||||
|
|
||||||
// Did we just leave an SEH finally block?
|
// Did we just leave an SEH finally block?
|
||||||
if (FStepStartedInFinSub = sfsStepExited) and (FTheDebugger.FStoppedReason = srNone) then begin
|
if (FStepStartedInFinSub = sfsStepExited) and (FTheDebugger.FStoppedReason = srNone) then begin
|
||||||
|
if (UpperCase(FTheDebugger.FCurrentLocation.FuncName) <> '__FPC_SPECIFIC_HANDLER') and
|
||||||
|
(FTheDebugger.FCurrentLocation.SrcFile <> '')
|
||||||
|
then begin
|
||||||
|
DoEndStepping;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
// run to next finally
|
// run to next finally
|
||||||
if ExecuteCommand('-data-read-memory $pc-2 x 1 1 2', [], R, [cfNoThreadContext, cfNoStackContext, cfNoMemLimits]) and
|
if ExecuteCommand('-data-read-memory $pc-2 x 1 1 2', [], R, [cfNoThreadContext, cfNoStackContext, cfNoMemLimits]) and
|
||||||
(r.State <> dsError)
|
(r.State <> dsError)
|
||||||
@ -7045,14 +7051,18 @@ var
|
|||||||
then begin
|
then begin
|
||||||
FTheDebugger.FFpcSpecificHandlerCallFin.Clear(Self);
|
FTheDebugger.FFpcSpecificHandlerCallFin.Clear(Self);
|
||||||
FTheDebugger.FFpcSpecificHandlerCallFin.SetAtCustomAddr(Self, MemDump.Addr);
|
FTheDebugger.FFpcSpecificHandlerCallFin.SetAtCustomAddr(Self, MemDump.Addr);
|
||||||
end;
|
FStepStartedInFinSub := sfsNone;
|
||||||
|
FCurrentExecCmd := ectContinue;
|
||||||
|
EnableFpcSpecificHandler;
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
DoEndStepping;
|
||||||
MemDump.Free;
|
MemDump.Free;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
DoEndStepping;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FStepStartedInFinSub := sfsNone;
|
|
||||||
FCurrentExecCmd := ectContinue;
|
|
||||||
EnableFpcSpecificHandler;
|
|
||||||
Result := True;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7393,7 +7403,7 @@ begin
|
|||||||
else
|
else
|
||||||
CheckWin64StepOverFinally; // Finally is in a subroutine, and may need step into
|
CheckWin64StepOverFinally; // Finally is in a subroutine, and may need step into
|
||||||
|
|
||||||
if (FExecType in [ectRunTo, ectStepOver{, ectStepInto}, ectStepOut, ectStepOverInstruction {, ectStepIntoInstruction}]) and
|
if (FExecType in [ectRunTo, ectStepOver, ectStepInto, ectStepOut, ectStepOverInstruction {, ectStepIntoInstruction}]) and
|
||||||
(ieRaiseBreakPoint in TGDBMIDebuggerPropertiesBase(FTheDebugger.GetProperties).InternalExceptionBreakPoints)
|
(ieRaiseBreakPoint in TGDBMIDebuggerPropertiesBase(FTheDebugger.GetProperties).InternalExceptionBreakPoints)
|
||||||
then
|
then
|
||||||
FTheDebugger.FReRaiseBreak.EnableOrSetByAddr(Self, True)
|
FTheDebugger.FReRaiseBreak.EnableOrSetByAddr(Self, True)
|
||||||
|
Loading…
Reference in New Issue
Block a user