GDBMI Debugger: add property for asm flavour.

git-svn-id: trunk@57955 -
This commit is contained in:
martin 2018-05-18 17:43:19 +00:00
parent d36c84686d
commit b374f7c125
3 changed files with 23 additions and 0 deletions

View File

@ -144,6 +144,9 @@ type
TGDBMIDebuggerCaseSensitivity = (
gdcsSmartOff, gdcsAlwaysOff, gdcsAlwaysOn, gdcsGdbDefault
);
TGDBMIDebuggerAssemblerStyle = (
gdasDefault, gdasIntel, gdasATT
);
{$scopedenums on}
TGDBMIDebuggerShowWarning = ( // need true/false to read old config
@ -155,6 +158,7 @@ type
TGDBMIDebuggerPropertiesBase = class(TDebuggerProperties)
private
FAssemblerStyle: TGDBMIDebuggerAssemblerStyle;
FCaseSensitivity: TGDBMIDebuggerCaseSensitivity;
FDisableForcedBreakpoint: Boolean;
FDisableLoadSymbolsForLibraries: Boolean;
@ -207,6 +211,7 @@ type
property WarnOnSetBreakpointError: TGDBMIWarnOnSetBreakpointError read FWarnOnSetBreakpointError
write FWarnOnSetBreakpointError default gdbwAll;
property GdbValueMemLimit: Integer read FGdbValueMemLimit write FGdbValueMemLimit default $60000000;
property AssemblerStyle: TGDBMIDebuggerAssemblerStyle read FAssemblerStyle write FAssemblerStyle default gdasDefault;
end;
TGDBMIDebuggerProperties = class(TGDBMIDebuggerPropertiesBase)
@ -229,6 +234,7 @@ type
//property WarnOnSetBreakpointError;
property CaseSensitivity;
property GdbValueMemLimit;
property AssemblerStyle;
end;
TGDBMIDebugger = class;
@ -496,6 +502,7 @@ type
function DoSetPascal: Boolean;
function DoSetCaseSensitivity: Boolean;
function DoSetMaxValueMemLimit: Boolean;
function DoSetAssemblerStyle: Boolean;
end;
{ TGDBMIDebuggerCommandChangeFilename }
@ -1887,6 +1894,15 @@ begin
Result:=true;
end;
function TGDBMIDebuggerChangeFilenameBase.DoSetAssemblerStyle: Boolean;
begin
case TGDBMIDebuggerProperties(FTheDebugger.GetProperties).AssemblerStyle of
gdasIntel: ExecuteCommand('-gdb-set disassembly-flavor intel', [], []);
gdasATT: ExecuteCommand('-gdb-set disassembly-flavor att', [], []);
end;
Result:=true;
end;
{ TGDBMIDbgInstructionQueue }
@ -5105,6 +5121,7 @@ begin
ExecuteCommand('-gdb-set language pascal', [cfCheckError]);
DoSetCaseSensitivity();
DoSetMaxValueMemLimit();
DoSetAssemblerStyle();
CheckAvailableTypes;
CommonInit;
@ -5396,6 +5413,7 @@ begin
DoSetPascal;
DoSetCaseSensitivity();
DoSetMaxValueMemLimit();
DoSetAssemblerStyle();
if (FTheDebugger.FileName <> '') and (pos('READING SYMBOLS FROM', UpperCase(CmdResp)) < 1) then begin
ExecuteCommand('ptype TObject', [], R);
@ -5405,6 +5423,7 @@ begin
DoSetPascal;
DoSetCaseSensitivity();
DoSetMaxValueMemLimit();
DoSetAssemblerStyle();
end;
end;
@ -7275,6 +7294,7 @@ begin
FWarnOnSetBreakpointError := gdbwAll;
FCaseSensitivity := gdcsSmartOff;
FGdbValueMemLimit := $60000000;
FAssemblerStyle := gdasDefault;
inherited;
end;
@ -7299,6 +7319,7 @@ begin
FWarnOnSetBreakpointError := TGDBMIDebuggerPropertiesBase(Source).FWarnOnSetBreakpointError;
FCaseSensitivity := TGDBMIDebuggerPropertiesBase(Source).FCaseSensitivity;
FGdbValueMemLimit := TGDBMIDebuggerPropertiesBase(Source).FGdbValueMemLimit;
FAssemblerStyle := TGDBMIDebuggerPropertiesBase(Source).FAssemblerStyle;
end;

View File

@ -79,6 +79,7 @@ type
//property WarnOnSetBreakpointError;
property CaseSensitivity;
property GdbValueMemLimit;
property AssemblerStyle;
end;
procedure Register;

View File

@ -93,6 +93,7 @@ type
//property WarnOnSetBreakpointError;
property CaseSensitivity;
property GdbValueMemLimit;
property AssemblerStyle;
end;
procedure Register;