FpDebug: Fix Step-Into - sometimes would step before the end of statement. This happened if a nested call was single step, and a "ret" statement encountered. The "ret" (in the nested) was attributed to the outer code, wrongly indicating the command "stepped out".

git-svn-id: trunk@63862 -
This commit is contained in:
martin 2020-09-03 16:32:27 +00:00
parent c5e7f1e250
commit 1a08e0ba34

View File

@ -95,7 +95,7 @@ type
procedure InitStackFrameInfo; inline;
procedure CallProcessContinue(ASingleStep: boolean);
procedure CallProcessContinue(ASingleStep: boolean; ASkipCheckNextInstr: Boolean = False);
procedure InternalContinue(AProcess: TDbgProcess; AThread: TDbgThread); virtual; abstract;
public
destructor Destroy; override;
@ -761,9 +761,10 @@ begin
FStackFrameInfo := FThread.GetCurrentStackFrameInfo;
end;
procedure TDbgControllerHiddenBreakStepBaseCmd.CallProcessContinue(ASingleStep: boolean);
procedure TDbgControllerHiddenBreakStepBaseCmd.CallProcessContinue(
ASingleStep: boolean; ASkipCheckNextInstr: Boolean);
begin
if (FStackFrameInfo <> nil) then
if (FStackFrameInfo <> nil) and (not ASkipCheckNextInstr) then
FStackFrameInfo.CheckNextInstruction(NextInstruction, ASingleStep);
FProcess.Continue(FProcess, FThread, ASingleStep);
@ -939,7 +940,7 @@ begin
if (FState <> siRunningStepOut) then
StoreWasAtJumpInstruction;
CallProcessContinue(FState <> siRunningStepOut);
CallProcessContinue(FState <> siRunningStepOut, FState = siSteppingNested);
end;
constructor TDbgControllerStepIntoLineCmd.Create(AController: TDbgController);