FpGdbmiDebugger: add option to disable loading library symbols (auto-solib-add = off)

git-svn-id: trunk@44761 -
This commit is contained in:
martin 2014-04-18 22:03:32 +00:00
parent 1e55a6b71d
commit dbefd92609
3 changed files with 20 additions and 0 deletions

View File

@ -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;

View File

@ -74,6 +74,7 @@ type
property EncodeCurrentDirPath;
property EncodeExeFileName;
property InternalStartBreak;
property DisableLoadSymbolsForLibraries;
end;
procedure Register;

View File

@ -85,6 +85,7 @@ type
property EncodeCurrentDirPath;
property EncodeExeFileName;
property InternalStartBreak;
property DisableLoadSymbolsForLibraries;
end;
procedure Register;