mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-01 14:19:32 +01:00
FpDebugServer: Added TFpDebugThreadQuitDebugServerCommand to quit application
git-svn-id: trunk@49061 -
This commit is contained in:
parent
48e5ae3ac0
commit
71acdc189d
@ -15,6 +15,7 @@ uses
|
||||
DbgIntfBaseTypes,
|
||||
strutils,
|
||||
debugthread,
|
||||
CustApp,
|
||||
SysUtils;
|
||||
|
||||
type
|
||||
@ -27,6 +28,15 @@ type
|
||||
function GetCommandByName(ATextName: string): TFpDebugThreadCommandClass;
|
||||
end;
|
||||
|
||||
{ TFpDebugThreadQuitDebugServerCommand }
|
||||
|
||||
TFpDebugThreadQuitDebugServerCommand = class(TFpDebugThreadCommand)
|
||||
public
|
||||
function PreExecute(AController: TDbgController; out DoQueueCommand: boolean): boolean; override;
|
||||
function Execute(AController: TDbgController; out DoProcessLoop: boolean): boolean; override;
|
||||
class function TextName: string; override;
|
||||
end;
|
||||
|
||||
{ TFpDebugThreadSetFilenameCommand }
|
||||
|
||||
TFpDebugThreadSetFilenameCommand = class(TFpDebugThreadCommand)
|
||||
@ -157,6 +167,24 @@ implementation
|
||||
var
|
||||
GFpDebugThreadCommandList: TFpDebugThreadCommandList = nil;
|
||||
|
||||
{ TFpDebugThreadQuitDebugServerCommand }
|
||||
|
||||
function TFpDebugThreadQuitDebugServerCommand.PreExecute(AController: TDbgController; out DoQueueCommand: boolean): boolean;
|
||||
begin
|
||||
DoQueueCommand:=false;
|
||||
CustomApplication.Terminate;
|
||||
end;
|
||||
|
||||
function TFpDebugThreadQuitDebugServerCommand.Execute(AController: TDbgController; out DoProcessLoop: boolean): boolean;
|
||||
begin
|
||||
// Do nothing
|
||||
end;
|
||||
|
||||
class function TFpDebugThreadQuitDebugServerCommand.TextName: string;
|
||||
begin
|
||||
result := 'quitdebugserver';
|
||||
end;
|
||||
|
||||
{ TFpDebugThreadRemoveBreakpointCommand }
|
||||
|
||||
function TFpDebugThreadRemoveBreakpointCommand.GetLocation: string;
|
||||
@ -433,6 +461,7 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
TFpDebugThreadCommandList.instance.Add(TFpDebugThreadQuitDebugServerCommand);
|
||||
TFpDebugThreadCommandList.instance.Add(TFpDebugThreadSetFilenameCommand);
|
||||
TFpDebugThreadCommandList.instance.Add(TFpDebugThreadRunCommand);
|
||||
TFpDebugThreadCommandList.instance.Add(TFpDebugThreadContinueCommand);
|
||||
|
||||
@ -181,6 +181,7 @@ var
|
||||
Application: TFPDServerApplication;
|
||||
begin
|
||||
Application:=TFPDServerApplication.Create(nil);
|
||||
CustomApplication:=Application;
|
||||
Application.Title:='FPDebug Server';
|
||||
Application.Run;
|
||||
Application.Free;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user