IDE: debug/complier-options dialog. Improve layout/dependencies

git-svn-id: trunk@32429 -
This commit is contained in:
martin 2011-09-19 21:45:35 +00:00
parent 8e1acdcf52
commit bf13fbd3d8
4 changed files with 162 additions and 97 deletions

View File

@ -2584,24 +2584,31 @@ begin
if (UseLineInfoUnit) then if (UseLineInfoUnit) then
switches := switches + ' -gl'; switches := switches + ' -gl';
{ Use Heaptrc Unit }
if (UseHeaptrc) and (not (ccloNoLinkerOpts in Flags)) then
switches := switches + ' -gh';
{ Generate code for Valgrind }
if (UseValgrind) and (not (ccloNoLinkerOpts in Flags)) then
switches := switches + ' -gv';
if (UseExternalDbgSyms) then
switches := switches + ' -Xg';
end
else begin
// no debug info wanted
{ Use Heaptrc Unit }
if (UseHeaptrc) and (not (ccloNoLinkerOpts in Flags)) then
switches := switches + ' -g-h'; // heaptrc, without -g
end; end;
{ Use Heaptrc Unit }
if (UseHeaptrc) and (not (ccloNoLinkerOpts in Flags)) then
switches := switches + ' -gh';
{ Generate code for Valgrind }
if (UseValgrind) and (not (ccloNoLinkerOpts in Flags)) then
switches := switches + ' -gv';
{ Generate code gprof } { Generate code gprof }
if (GenGProfCode) then if (GenGProfCode) then
switches := switches + ' -pg'; switches := switches + ' -pg';
if (UseExternalDbgSyms) then
switches := switches + ' -Xg';
{ Strip Symbols } { Strip Symbols }
if (StripSymbols) and (not (ccloNoLinkerOpts in Flags)) then if (StripSymbols) and (not (ccloNoLinkerOpts in Flags)) then
switches := switches + ' -Xs'; switches := switches + ' -Xs';

View File

@ -5,12 +5,28 @@ inherited CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
ClientWidth = 639 ClientWidth = 639
DesignLeft = 346 DesignLeft = 346
DesignTop = 181 DesignTop = 181
object grpLinkLibraries: TGroupBox[0] object chkDebugGDB: TCheckBox[0]
Left = 6
Height = 19
Top = 6
Width = 627
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkDebugGDB'
OnChange = chkDebugGDBChange
TabOrder = 4
end
object grpLinkLibraries: TGroupBox[1]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpDebug2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 49 Height = 49
Top = 234 Top = 270
Width = 639 Width = 639
Align = alTop Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'grpLinkLibraries' Caption = 'grpLinkLibraries'
@ -28,12 +44,17 @@ inherited CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
TabOrder = 0 TabOrder = 0
end end
end end
object TargetSpecificsGrpBox: TGroupBox[1] object TargetSpecificsGrpBox: TGroupBox[2]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpLinkLibraries
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 49 Height = 49
Top = 289 Top = 325
Width = 639 Width = 639
Align = alTop Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'TargetSpecificsGrpBox' Caption = 'TargetSpecificsGrpBox'
@ -51,12 +72,17 @@ inherited CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
TabOrder = 0 TabOrder = 0
end end
end end
object grpOptions: TGroupBox[2] object grpOptions: TGroupBox[3]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpLinkLibraries
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 78 Height = 78
Top = 344 Top = 325
Width = 639 Width = 639
Align = alTop Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'grpOptions' Caption = 'grpOptions'
@ -84,117 +110,82 @@ inherited CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
Text = 'edtOptionsLinkOpt' Text = 'edtOptionsLinkOpt'
end end
end end
object grpDebugging: TGroupBox[3] object grpDebugging: TGroupBox[4]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = chkDebugGDB
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 228 Height = 128
Top = 0 Top = 31
Width = 639 Width = 639
Align = alTop Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
Caption = 'grpDebugging' Caption = 'grpDebugging'
ClientHeight = 210 ClientHeight = 110
ClientWidth = 635 ClientWidth = 635
TabOrder = 3 TabOrder = 3
object chkDebugGDB: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = grpDebugging
Left = 6
Height = 19
Top = 6
Width = 97
BorderSpacing.Around = 6
Caption = 'chkDebugGDB'
OnChange = chkDebugGDBChange
TabOrder = 0
end
object chkUseLineInfoUnit: TCheckBox object chkUseLineInfoUnit: TCheckBox
AnchorSideLeft.Control = grpDebugging AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = dropDbgSymbolType AnchorSideTop.Control = dropDbgSymbolType
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Side = asrBottom
Left = 6 Left = 6
Height = 19 Height = 19
Top = 60 Top = 35
Width = 123 Width = 623
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkUseLineInfoUnit' Caption = 'chkUseLineInfoUnit'
TabOrder = 1 TabOrder = 0
end
object chkUseHeaptrc: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = chkUseLineInfoUnit
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 85
Width = 100
BorderSpacing.Around = 6
Caption = 'chkUseHeaptrc'
TabOrder = 2
end end
object chkUseValgrind: TCheckBox object chkUseValgrind: TCheckBox
AnchorSideLeft.Control = grpDebugging AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = chkUseHeaptrc AnchorSideTop.Control = chkUseLineInfoUnit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Side = asrBottom
Left = 6 Left = 6
Height = 19 Height = 19
Top = 110 Top = 60
Width = 102 Width = 623
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkUseValgrind' Caption = 'chkUseValgrind'
TabOrder = 3 TabOrder = 1
end
object chkGenGProfCode: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = chkUseValgrind
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 135
Width = 118
BorderSpacing.Around = 6
Caption = 'chkGenGProfCode'
TabOrder = 4
end
object chkSymbolsStrip: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = chkGenGProfCode
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 160
Width = 108
BorderSpacing.Around = 6
Caption = 'chkSymbolsStrip'
TabOrder = 5
end end
object chkUseExternalDbgSyms: TCheckBox object chkUseExternalDbgSyms: TCheckBox
AnchorSideLeft.Control = grpDebugging AnchorSideLeft.Control = grpDebugging
AnchorSideTop.Control = chkSymbolsStrip AnchorSideTop.Control = chkUseValgrind
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Side = asrBottom
Left = 6 Left = 6
Height = 19 Height = 19
Top = 185 Top = 85
Width = 149 Width = 623
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkUseExternalDbgSyms' Caption = 'chkUseExternalDbgSyms'
TabOrder = 6 TabOrder = 3
end end
object dropDbgSymbolType: TComboBox object dropDbgSymbolType: TComboBox
AnchorSideLeft.Control = lblDbgSymbolType AnchorSideLeft.Control = lblDbgSymbolType
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = chkDebugGDB AnchorSideTop.Control = lblEmpty
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging AnchorSideRight.Control = grpDebugging
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 114 Left = 114
Height = 23 Height = 23
Top = 31 Top = 6
Width = 515 Width = 515
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 15 ItemHeight = 15
Style = csDropDownList Style = csDropDownList
TabOrder = 7 TabOrder = 2
end end
object lblDbgSymbolType: TLabel object lblDbgSymbolType: TLabel
AnchorSideLeft.Control = grpDebugging AnchorSideLeft.Control = grpDebugging
@ -202,11 +193,75 @@ inherited CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 16 Height = 16
Top = 34 Top = 9
Width = 102 Width = 102
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'lblDbgSymbolType' Caption = 'lblDbgSymbolType'
ParentColor = False ParentColor = False
end end
object lblEmpty: TLabel
Left = 0
Height = 1
Top = 0
Width = 635
Align = alTop
ParentColor = False
end
end
object grpDebug2: TGroupBox[5]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpDebugging
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 99
Top = 165
Width = 639
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'grpDebug2'
ClientHeight = 81
ClientWidth = 635
TabOrder = 5
object chkUseHeaptrc: TCheckBox
Left = 6
Height = 19
Top = 6
Width = 623
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkUseHeaptrc'
TabOrder = 0
end
object chkGenGProfCode: TCheckBox
AnchorSideTop.Control = chkUseHeaptrc
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebug2
AnchorSideRight.Side = asrBottom
Left = 6
Height = 19
Top = 31
Width = 623
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
Caption = 'chkGenGProfCode'
TabOrder = 1
end
object chkSymbolsStrip: TCheckBox
AnchorSideTop.Control = chkGenGProfCode
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebug2
AnchorSideRight.Side = asrBottom
Left = 6
Height = 19
Top = 56
Width = 623
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
Caption = 'chkSymbolsStrip'
TabOrder = 2
end
end end
end end

View File

@ -25,9 +25,11 @@ type
chkWin32GraphicApp: TCheckBox; chkWin32GraphicApp: TCheckBox;
dropDbgSymbolType: TComboBox; dropDbgSymbolType: TComboBox;
edtOptionsLinkOpt: TEdit; edtOptionsLinkOpt: TEdit;
grpDebug2: TGroupBox;
grpDebugging: TGroupBox; grpDebugging: TGroupBox;
grpLinkLibraries: TGroupBox; grpLinkLibraries: TGroupBox;
grpOptions: TGroupBox; grpOptions: TGroupBox;
lblEmpty: TLabel;
lblDbgSymbolType: TLabel; lblDbgSymbolType: TLabel;
TargetSpecificsGrpBox: TGroupBox; TargetSpecificsGrpBox: TGroupBox;
procedure chkDebugGDBChange(Sender: TObject); procedure chkDebugGDBChange(Sender: TObject);
@ -76,8 +78,7 @@ end;
procedure TCompilerLinkingOptionsFrame.chkDebugGDBChange(Sender: TObject); procedure TCompilerLinkingOptionsFrame.chkDebugGDBChange(Sender: TObject);
begin begin
dropDbgSymbolType.Enabled := chkDebugGDB.Checked; grpDebugging.Enabled := chkDebugGDB.Checked;
chkUseLineInfoUnit.Enabled := chkDebugGDB.Checked;
end; end;
function TCompilerLinkingOptionsFrame.GetTitle: string; function TCompilerLinkingOptionsFrame.GetTitle: string;
@ -94,7 +95,9 @@ begin
Caption := dlgCODebugging; Caption := dlgCODebugging;
end; end;
chkDebugGDB.Caption := dlgCOGDB + ' (-g)'; grpDebug2.Caption := dlgCODebugging2;
chkDebugGDB.Caption := dlgCOGDB;
lblDbgSymbolType.Caption := dlgCOSymbolType; lblDbgSymbolType.Caption := dlgCOSymbolType;
dropDbgSymbolType.Items.Clear; dropDbgSymbolType.Items.Clear;
// Adjust constants above, if re-ordering // Adjust constants above, if re-ordering
@ -147,8 +150,7 @@ begin
grpOptions.Enabled := NeedsLinkerOpts; grpOptions.Enabled := NeedsLinkerOpts;
end; end;
dropDbgSymbolType.Enabled := chkDebugGDB.Checked; grpDebugging.Enabled := chkDebugGDB.Checked;
chkUseLineInfoUnit.Enabled := chkDebugGDB.Checked;
end; end;
procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions); procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);

View File

@ -1824,7 +1824,8 @@ resourcestring
dlgLevel3Opt = 'Level 3 (Level 2 + slow optimizations)'; dlgLevel3Opt = 'Level 3 (Level 2 + slow optimizations)';
dlgTargetOS = 'Target OS'; dlgTargetOS = 'Target OS';
dlgTargetCPUFamily = 'Target CPU family'; dlgTargetCPUFamily = 'Target CPU family';
dlgCODebugging = 'Debugging:'; dlgCODebugging = 'Debugging Info:';
dlgCODebugging2 = 'Debugging:';
dlgCOGDB = 'Generate Debugging Info For GDB (Slower / Increases exe-size)'; dlgCOGDB = 'Generate Debugging Info For GDB (Slower / Increases exe-size)';
dlgCOSymbolType = 'Chose type of debug info'; dlgCOSymbolType = 'Chose type of debug info';
dlgCOSymbolTypeAuto = 'Automatic'; dlgCOSymbolTypeAuto = 'Automatic';
@ -1834,7 +1835,7 @@ resourcestring
dlgCOSymbolTypeDwarf3 = 'Dwarf3 (beta)'; dlgCOSymbolTypeDwarf3 = 'Dwarf3 (beta)';
dlgCODBX = 'Generate Debugging Info For DBX (Slows Compiling)'; dlgCODBX = 'Generate Debugging Info For DBX (Slows Compiling)';
dlgLNumsBct = 'Display Line Numbers in Run-time Error Backtraces'; dlgLNumsBct = 'Display Line Numbers in Run-time Error Backtraces';
dlgCOHeaptrc = 'Use Heaptrc Unit'; dlgCOHeaptrc = 'Use Heaptrc Unit (check for mem-leaks)';
dlgCOValgrind = 'Generate code for valgrind'; dlgCOValgrind = 'Generate code for valgrind';
dlgGPROF = 'Generate code for gprof'; dlgGPROF = 'Generate code for gprof';
dlgCOStrip = 'Strip Symbols From Executable'; dlgCOStrip = 'Strip Symbols From Executable';