mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 21:02:55 +02:00
FpDebug: defaults for DW_AT_lower_bound
This commit is contained in:
parent
2383f18a82
commit
b2ed046722
@ -5552,11 +5552,22 @@ var
|
||||
begin
|
||||
assert((AValueObj = nil) or (AValueObj is TFpValueDwarf), 'TFpSymbolDwarfTypeSubRange.GetValueLowBound: AValueObj is TFpValueDwarf(');
|
||||
if FLowBoundState = rfNotRead then begin
|
||||
if InformationEntry.GetAttribData(DW_AT_lower_bound, AttrData) then
|
||||
ConstRefOrExprFromAttrData(AttrData, TFpValueDwarf(AValueObj), t, @FLowBoundState, @FLowBoundSymbol)
|
||||
else
|
||||
FLowBoundState := rfNotFound;
|
||||
FLowBoundConst := t;
|
||||
if InformationEntry.GetAttribData(DW_AT_lower_bound, AttrData) then begin
|
||||
ConstRefOrExprFromAttrData(AttrData, TFpValueDwarf(AValueObj), t, @FLowBoundState, @FLowBoundSymbol);
|
||||
FLowBoundConst := t;
|
||||
end
|
||||
else begin
|
||||
FLowBoundState := rfConst;
|
||||
case CompilationUnit.LanguageId of
|
||||
DW_LANG_Ada83, DW_LANG_Cobol74, DW_LANG_Cobol85,
|
||||
DW_LANG_Fortran77, DW_LANG_Fortran90, DW_LANG_Pascal83,
|
||||
DW_LANG_Modula2, DW_LANG_Ada95, DW_LANG_Fortran95,
|
||||
DW_LANG_PLI:
|
||||
FLowBoundConst := 1;
|
||||
else
|
||||
FLowBoundConst := 0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := FLowBoundState in [rfConst, rfValue, rfExpression];
|
||||
|
@ -666,6 +666,7 @@ type
|
||||
FCompDir: String;
|
||||
FUnitName: String;
|
||||
FIdentifierCase: Integer;
|
||||
FLanguageId: Integer;
|
||||
FProducer: String;
|
||||
|
||||
FAbbrevList: TDwarfAbbrevList;
|
||||
@ -763,6 +764,7 @@ type
|
||||
property FileName: String read FFileName;
|
||||
property UnitName: String read GetUnitName;
|
||||
property IdentifierCase: Integer read FIdentifierCase;
|
||||
property LanguageId: Integer read FLanguageId;
|
||||
property Producer: String read FProducer;
|
||||
property BaseAddress: TDBGPtr read FMinPC;
|
||||
|
||||
@ -5190,6 +5192,9 @@ begin
|
||||
if LocateAttribute(Scope.Entry, DW_AT_producer, AttribList, Attrib, Form)
|
||||
then ReadValue(Attrib, Form, FProducer);
|
||||
|
||||
if LocateAttribute(Scope.Entry, DW_AT_language, AttribList, Attrib, Form)
|
||||
then ReadValue(Attrib, Form, FLanguageId);
|
||||
|
||||
FDwarfSymbolClassMap := DwarfSymbolClassMapList.FindMapForCompUnit(Self);
|
||||
assert(FDwarfSymbolClassMap <> nil, 'TDwarfCompilationUnit.Create: FDwarfSymbolClassMap <> nil');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user