From bd49e508e25d8ba71f471ac218ce2ce997364817 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 18 May 2018 17:58:39 +0000 Subject: [PATCH] GDBMI Debugger: add property to disable startup shell git-svn-id: trunk@57956 - --- components/lazdebuggergdbmi/gdbmidebugger.pp | 16 ++++++++++++++++ .../lazdebuggergdbmi/gdbmiserverdebugger.pas | 1 + components/lazdebuggergdbmi/sshgdbmidebugger.pas | 1 + 3 files changed, 18 insertions(+) diff --git a/components/lazdebuggergdbmi/gdbmidebugger.pp b/components/lazdebuggergdbmi/gdbmidebugger.pp index a26556bc89..3510ccb9f5 100644 --- a/components/lazdebuggergdbmi/gdbmidebugger.pp +++ b/components/lazdebuggergdbmi/gdbmidebugger.pp @@ -162,6 +162,7 @@ type FCaseSensitivity: TGDBMIDebuggerCaseSensitivity; FDisableForcedBreakpoint: Boolean; FDisableLoadSymbolsForLibraries: Boolean; + FDisableStartupShell: Boolean; FEncodeCurrentDirPath: TGDBMIDebuggerFilenameEncoding; FEncodeExeFileName: TGDBMIDebuggerFilenameEncoding; {$IFDEF UNIX} @@ -212,6 +213,8 @@ type write FWarnOnSetBreakpointError default gdbwAll; property GdbValueMemLimit: Integer read FGdbValueMemLimit write FGdbValueMemLimit default $60000000; property AssemblerStyle: TGDBMIDebuggerAssemblerStyle read FAssemblerStyle write FAssemblerStyle default gdasDefault; + property DisableStartupShell: Boolean read FDisableStartupShell + write FDisableStartupShell default False; end; TGDBMIDebuggerProperties = class(TGDBMIDebuggerPropertiesBase) @@ -235,6 +238,7 @@ type property CaseSensitivity; property GdbValueMemLimit; property AssemblerStyle; + property DisableStartupShell; end; TGDBMIDebugger = class; @@ -503,6 +507,7 @@ type function DoSetCaseSensitivity: Boolean; function DoSetMaxValueMemLimit: Boolean; function DoSetAssemblerStyle: Boolean; + function DoSetDisableStartupShell: Boolean; end; { TGDBMIDebuggerCommandChangeFilename } @@ -1903,6 +1908,13 @@ begin Result:=true; end; +function TGDBMIDebuggerChangeFilenameBase.DoSetDisableStartupShell: Boolean; +begin + if TGDBMIDebuggerProperties(FTheDebugger.GetProperties).DisableStartupShell then + ExecuteCommand('set startup-with-shell off', [], []); + Result:=true; +end; + { TGDBMIDbgInstructionQueue } @@ -5119,6 +5131,7 @@ begin {$ENDIF} ExecuteCommand('-gdb-set language pascal', [cfCheckError]); + DoSetDisableStartupShell(); DoSetCaseSensitivity(); DoSetMaxValueMemLimit(); DoSetAssemblerStyle(); @@ -5411,6 +5424,7 @@ begin TargetInfo^.TargetPID := NewPID; DoSetPascal; + DoSetDisableStartupShell(); DoSetCaseSensitivity(); DoSetMaxValueMemLimit(); DoSetAssemblerStyle(); @@ -7295,6 +7309,7 @@ begin FCaseSensitivity := gdcsSmartOff; FGdbValueMemLimit := $60000000; FAssemblerStyle := gdasDefault; + FDisableStartupShell := False; inherited; end; @@ -7320,6 +7335,7 @@ begin FCaseSensitivity := TGDBMIDebuggerPropertiesBase(Source).FCaseSensitivity; FGdbValueMemLimit := TGDBMIDebuggerPropertiesBase(Source).FGdbValueMemLimit; FAssemblerStyle := TGDBMIDebuggerPropertiesBase(Source).FAssemblerStyle; + FDisableStartupShell := TGDBMIDebuggerPropertiesBase(Source).FDisableStartupShell; end; diff --git a/components/lazdebuggergdbmi/gdbmiserverdebugger.pas b/components/lazdebuggergdbmi/gdbmiserverdebugger.pas index 1dd27d8912..f7941e5320 100644 --- a/components/lazdebuggergdbmi/gdbmiserverdebugger.pas +++ b/components/lazdebuggergdbmi/gdbmiserverdebugger.pas @@ -80,6 +80,7 @@ type property CaseSensitivity; property GdbValueMemLimit; property AssemblerStyle; + property DisableStartupShell; end; procedure Register; diff --git a/components/lazdebuggergdbmi/sshgdbmidebugger.pas b/components/lazdebuggergdbmi/sshgdbmidebugger.pas index e2d2494db0..7e5d18d93e 100644 --- a/components/lazdebuggergdbmi/sshgdbmidebugger.pas +++ b/components/lazdebuggergdbmi/sshgdbmidebugger.pas @@ -94,6 +94,7 @@ type property CaseSensitivity; property GdbValueMemLimit; property AssemblerStyle; + property DisableStartupShell; end; procedure Register;