FpDebug: add flag dafHasArtifical - only read value, if present

This commit is contained in:
Martin 2023-03-21 09:37:29 +01:00
parent 3bff86dc23
commit c5057d55ed

View File

@ -146,6 +146,7 @@ type
TDwarfAbbrevFlag = ( TDwarfAbbrevFlag = (
dafHasChildren, dafHasChildren,
dafHasName, dafHasName,
dafHasArtifical,
dafHasLowAddr, dafHasLowAddr,
dafHasStartScope, dafHasStartScope,
dafHasAbstractOrigin dafHasAbstractOrigin
@ -1600,6 +1601,9 @@ begin
if attrib = DW_AT_name then if attrib = DW_AT_name then
Include(f, dafHasName) Include(f, dafHasName)
else else
if attrib = DW_AT_artificial then
Include(f, dafHasArtifical)
else
if attrib = DW_AT_low_pc then if attrib = DW_AT_low_pc then
Include(f, dafHasLowAddr) Include(f, dafHasLowAddr)
else else
@ -2911,7 +2915,7 @@ begin
Continue; Continue;
end; end;
if ASkipArtificial then begin if ASkipArtificial and (dafHasArtifical in FAbbrev^.flags) then begin
if ReadValue(DW_AT_artificial, Val) and (Val <> 0) then begin if ReadValue(DW_AT_artificial, Val) and (Val <> 0) then begin
GoNext; GoNext;
Continue; Continue;
@ -3424,7 +3428,8 @@ function TDwarfInformationEntry.IsArtificial: Boolean;
var var
Val: Integer; Val: Integer;
begin begin
Result := ReadValue(DW_AT_artificial, Val); Result := dafHasArtifical in FAbbrev^.flags;
if Result then Result := ReadValue(DW_AT_artificial, Val);
if Result then Result := Val <> 0; if Result then Result := Val <> 0;
end; end;