mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-11 08:58:17 +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;
|
FController: TDbgController;
|
||||||
FThread: TDbgThread;
|
FThread: TDbgThread;
|
||||||
FProcess: TDbgProcess;
|
FProcess: TDbgProcess;
|
||||||
|
FIsInitialized: Boolean;
|
||||||
procedure Init; virtual;
|
procedure Init; virtual;
|
||||||
function IsAtCallInstruction: Integer;
|
function IsAtCallInstruction: Integer;
|
||||||
procedure DoResolveEvent(var AnEvent: TFPDEvent; AnEventThread: TDbgThread; out Handled, Finished: boolean); virtual; abstract;
|
procedure DoResolveEvent(var AnEvent: TFPDEvent; AnEventThread: TDbgThread; out Handled, Finished: boolean); virtual; abstract;
|
||||||
public
|
public
|
||||||
constructor Create(AController: TDbgController); virtual;
|
constructor Create(AController: TDbgController); virtual;
|
||||||
|
procedure DoBeforeLoopStart;
|
||||||
procedure DoContinue(AProcess: TDbgProcess; AThread: TDbgThread); virtual; abstract;
|
procedure DoContinue(AProcess: TDbgProcess; AThread: TDbgThread); virtual; abstract;
|
||||||
procedure ResolveEvent(var AnEvent: TFPDEvent; AnEventThread: TDbgThread; out Handled, Finished: boolean); virtual;
|
procedure ResolveEvent(var AnEvent: TFPDEvent; AnEventThread: TDbgThread; out Handled, Finished: boolean); virtual;
|
||||||
end;
|
end;
|
||||||
@ -237,7 +239,13 @@ begin
|
|||||||
FController := AController;
|
FController := AController;
|
||||||
FProcess := FController.CurrentProcess;
|
FProcess := FController.CurrentProcess;
|
||||||
FThread := FController.CurrentThread;
|
FThread := FController.CurrentThread;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDbgControllerCmd.DoBeforeLoopStart;
|
||||||
|
begin
|
||||||
|
if not FIsInitialized then
|
||||||
Init;
|
Init;
|
||||||
|
FIsInitialized := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDbgControllerCmd.ResolveEvent(var AnEvent: TFPDEvent;
|
procedure TDbgControllerCmd.ResolveEvent(var AnEvent: TFPDEvent;
|
||||||
@ -827,6 +835,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
FCommandToBeFreed.Free;
|
FCommandToBeFreed.Free;
|
||||||
|
if FCommand <> nil then
|
||||||
|
FCommand.DoBeforeLoopStart;
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
if assigned(FCurrentProcess) and not assigned(FMainProcess) then
|
if assigned(FCurrentProcess) and not assigned(FMainProcess) then
|
||||||
|
Loading…
Reference in New Issue
Block a user