mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-02 19:47:02 +01:00
FpGdbmiDebugger: add option to disable loading library symbols (auto-solib-add = off)
git-svn-id: trunk@44761 -
This commit is contained in:
parent
1e55a6b71d
commit
dbefd92609
@ -122,6 +122,7 @@ type
|
||||
|
||||
TGDBMIDebuggerPropertiesBase = class(TDebuggerProperties)
|
||||
private
|
||||
FDisableLoadSymbolsForLibraries: Boolean;
|
||||
FEncodeCurrentDirPath: TGDBMIDebuggerFilenameEncoding;
|
||||
FEncodeExeFileName: TGDBMIDebuggerFilenameEncoding;
|
||||
{$IFDEF UNIX}
|
||||
@ -156,6 +157,8 @@ type
|
||||
property InternalStartBreak: TGDBMIDebuggerStartBreak
|
||||
read FInternalStartBreak write FInternalStartBreak default gdsbDefault;
|
||||
property UseAsyncCommandMode: Boolean read FUseAsyncCommandMode write FUseAsyncCommandMode;
|
||||
property DisableLoadSymbolsForLibraries: Boolean read FDisableLoadSymbolsForLibraries
|
||||
write FDisableLoadSymbolsForLibraries default False;
|
||||
end;
|
||||
|
||||
TGDBMIDebuggerProperties = class(TGDBMIDebuggerPropertiesBase)
|
||||
@ -172,6 +175,7 @@ type
|
||||
property EncodeExeFileName;
|
||||
property InternalStartBreak;
|
||||
property UseAsyncCommandMode;
|
||||
property DisableLoadSymbolsForLibraries;
|
||||
end;
|
||||
|
||||
TGDBMIDebugger = class;
|
||||
@ -656,6 +660,7 @@ type
|
||||
FCommandAsyncState: Array [TGDBMIExecCommandType] of Boolean;
|
||||
FCurrentCmdIsAsync: Boolean;
|
||||
FAsyncModeEnabled: Boolean;
|
||||
FWasDisableLoadSymbolsForLibraries: Boolean;
|
||||
|
||||
// Internal Current values
|
||||
FCurrentStackFrame, FCurrentThreadId: Integer; // User set values
|
||||
@ -2354,6 +2359,17 @@ begin
|
||||
ExecuteCommand('set print elements %d',
|
||||
[TGDBMIDebuggerPropertiesBase(FTheDebugger.GetProperties).MaxDisplayLengthForString],
|
||||
[]);
|
||||
|
||||
if DebuggerProperties.DisableLoadSymbolsForLibraries then begin
|
||||
ExecuteCommand('set auto-solib-add off', [cfscIgnoreState, cfscIgnoreError]);
|
||||
FTheDebugger.FWasDisableLoadSymbolsForLibraries := True;
|
||||
end
|
||||
else begin
|
||||
// Only unset, if it was set due to this property
|
||||
if FTheDebugger.FWasDisableLoadSymbolsForLibraries then
|
||||
ExecuteCommand('set auto-solib-add on', [cfscIgnoreState, cfscIgnoreError]);
|
||||
FTheDebugger.FWasDisableLoadSymbolsForLibraries := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TGDBMIDebuggerCommandExecuteBase }
|
||||
@ -7064,6 +7080,7 @@ begin
|
||||
FEncodeExeFileName := gdfeDefault;
|
||||
FInternalStartBreak := gdsbDefault;
|
||||
FUseAsyncCommandMode := False;
|
||||
FDisableLoadSymbolsForLibraries := False;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
@ -7081,6 +7098,7 @@ begin
|
||||
FEncodeExeFileName := TGDBMIDebuggerPropertiesBase(Source).FEncodeExeFileName;
|
||||
FInternalStartBreak := TGDBMIDebuggerPropertiesBase(Source).FInternalStartBreak;
|
||||
FUseAsyncCommandMode := TGDBMIDebuggerPropertiesBase(Source).FUseAsyncCommandMode;
|
||||
FDisableLoadSymbolsForLibraries := TGDBMIDebuggerPropertiesBase(Source).FDisableLoadSymbolsForLibraries;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
@ -74,6 +74,7 @@ type
|
||||
property EncodeCurrentDirPath;
|
||||
property EncodeExeFileName;
|
||||
property InternalStartBreak;
|
||||
property DisableLoadSymbolsForLibraries;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
@ -85,6 +85,7 @@ type
|
||||
property EncodeCurrentDirPath;
|
||||
property EncodeExeFileName;
|
||||
property InternalStartBreak;
|
||||
property DisableLoadSymbolsForLibraries;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user