mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 03:39:34 +02:00
LazDebuggerFp: Fix crash when starting debugger with F7/F8 - Disable them, as they currently do not stop at program entry
git-svn-id: trunk@61815 -
This commit is contained in:
parent
d2f267dd05
commit
2fa22bf873
@ -1808,10 +1808,11 @@ begin
|
||||
result := False;
|
||||
if assigned(FDbgController) then
|
||||
FDbgController.NextOnlyStopOnStartLine := TFpDebugDebuggerProperties(GetProperties).NextOnlyStopOnStartLine;
|
||||
case ACommand of
|
||||
dcRun:
|
||||
begin
|
||||
if not assigned(FDbgController.MainProcess) then
|
||||
|
||||
if (ACommand in [dcRun, dcStepOver, dcStepInto, dcStepOut, dcRunTo, dcJumpto,
|
||||
dcStepOverInstr, dcStepIntoInstr]) and
|
||||
not assigned(FDbgController.MainProcess)
|
||||
then
|
||||
begin
|
||||
FDbgController.ExecutableFilename:=FileName;
|
||||
AConsoleTty:=TFpDebugDebuggerProperties(GetProperties).ConsoleTty;
|
||||
@ -1840,12 +1841,17 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
SetState(dsInit);
|
||||
end
|
||||
else
|
||||
// TODO: any step commond should run to "main" or "pascalmain"
|
||||
// Currently disabled in TFpDebugDebugger.GetSupportedCommands
|
||||
StartDebugLoop;
|
||||
exit;
|
||||
end;
|
||||
|
||||
case ACommand of
|
||||
dcRun:
|
||||
begin
|
||||
Result := True;
|
||||
SetState(dsRun);
|
||||
end;
|
||||
StartDebugLoop;
|
||||
end;
|
||||
dcStop:
|
||||
@ -2260,6 +2266,8 @@ function TFpDebugDebugger.GetSupportedCommands: TDBGCommands;
|
||||
begin
|
||||
Result:=[dcRun, dcStop, dcStepIntoInstr, dcStepOverInstr, dcStepOver,
|
||||
dcRunTo, dcPause, dcStepOut, dcStepInto, dcEvaluate, dcSendConsoleInput];
|
||||
if State = dsStop then
|
||||
Result := Result - [dcStepInto, dcStepOver, dcStepOut, dcStepIntoInstr, dcStepOverInstr];
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user