Debugger: set default for "enable dwarf" dialog

This commit is contained in:
Martin 2022-09-27 12:08:30 +02:00
parent 5882a5bfb5
commit bf6c6ba4d9
5 changed files with 17 additions and 2 deletions

View File

@ -1537,7 +1537,15 @@ type
etWindowsMessageSent
);
TDebugCompilerRequirement = (dcrNoExternalDbgInfo, dcrExternalDbgInfoOnly, dcrDwarfOnly);
TDebugCompilerRequirement = (
dcrNoExternalDbgInfo,
dcrExternalDbgInfoOnly,
dcrDwarfOnly,
// preferred defaults
dcrPreferDwarf2Sets,
dcrPreferDwarf3
);
TDebugCompilerRequirements = set of TDebugCompilerRequirement;
TDBGFeedbackType = (ftInformation, ftWarning, ftError);

View File

@ -4569,6 +4569,7 @@ begin
{$ELSE}
Result:=[dcrDwarfOnly];
{$ENDIF}
Result := Result + [dcrPreferDwarf3];
end;
class function TFpDebugDebugger.CreateProperties: TDebuggerProperties;

View File

@ -1714,6 +1714,7 @@ begin
Result:=[dcrNoExternalDbgInfo, dcrDwarfOnly];
{$ENDIF}
{$ENDIF}
Result := Result + [dcrPreferDwarf3];
end;
constructor TFpLldbDebugger.Create(const AExternalDebugger: String);

View File

@ -3134,7 +3134,7 @@ end;
class function TLldbDebugger.RequiredCompilerOpts(ATargetCPU, ATargetOS: String
): TDebugCompilerRequirements;
begin
Result:=[dcrDwarfOnly];
Result:=[dcrDwarfOnly, dcrPreferDwarf2Sets];
end;
function TLldbDebugger.GetLocation: TDBGLocationRec;

View File

@ -7347,6 +7347,11 @@ begin
ModalResult := 400;
Caption := lisTheProjectDoesNotUseDwarf_TaskDlg_NoDebugBtn_Caption;
end;
if dcrPreferDwarf2Sets in ReqOpts then
ChangeDebugInfoFormatDialog.RadioButtons.DefaultButton := ChangeDebugInfoFormatDialog.RadioButtons[0]
else
if dcrPreferDwarf3 in ReqOpts then
ChangeDebugInfoFormatDialog.RadioButtons.DefaultButton := ChangeDebugInfoFormatDialog.RadioButtons[2];
ChangeDebugInfoFormatDialog.OnButtonClicked := @DlgDebugInfoHelpRequested;