mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 00:58:20 +02:00
FpDebug: move ...Command.Init into the thread. In case it needs to access process data.
git-svn-id: trunk@61883 -
This commit is contained in:
parent
618ad4ba32
commit
52a25d352c
@ -29,11 +29,13 @@ type
|
||||
FController: TDbgController;
|
||||
FThread: TDbgThread;
|
||||
FProcess: TDbgProcess;
|
||||
FIsInitialized: Boolean;
|
||||
procedure Init; virtual;
|
||||
function IsAtCallInstruction: Integer;
|
||||
procedure DoResolveEvent(var AnEvent: TFPDEvent; AnEventThread: TDbgThread; out Handled, Finished: boolean); virtual; abstract;
|
||||
public
|
||||
constructor Create(AController: TDbgController); virtual;
|
||||
procedure DoBeforeLoopStart;
|
||||
procedure DoContinue(AProcess: TDbgProcess; AThread: TDbgThread); virtual; abstract;
|
||||
procedure ResolveEvent(var AnEvent: TFPDEvent; AnEventThread: TDbgThread; out Handled, Finished: boolean); virtual;
|
||||
end;
|
||||
@ -237,7 +239,13 @@ begin
|
||||
FController := AController;
|
||||
FProcess := FController.CurrentProcess;
|
||||
FThread := FController.CurrentThread;
|
||||
Init;
|
||||
end;
|
||||
|
||||
procedure TDbgControllerCmd.DoBeforeLoopStart;
|
||||
begin
|
||||
if not FIsInitialized then
|
||||
Init;
|
||||
FIsInitialized := True;
|
||||
end;
|
||||
|
||||
procedure TDbgControllerCmd.ResolveEvent(var AnEvent: TFPDEvent;
|
||||
@ -827,6 +835,8 @@ begin
|
||||
end;
|
||||
|
||||
FCommandToBeFreed.Free;
|
||||
if FCommand <> nil then
|
||||
FCommand.DoBeforeLoopStart;
|
||||
|
||||
repeat
|
||||
if assigned(FCurrentProcess) and not assigned(FMainProcess) then
|
||||
|
Loading…
Reference in New Issue
Block a user