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