FpDebug: improve loading DWARF line info. Fix workaround for FPC issue 37658 / check the expanded FileName

This commit is contained in:
Martin 2025-01-29 11:20:07 +01:00
parent 77acd9acdb
commit 5141571608

View File

@ -5611,7 +5611,7 @@ constructor TDwarfCompilationUnit.Create(AOwner: TFpDwarfInfo; ADebugFile: PDwar
if diridx < FLineInfo.Directories.Count then begin
S2 := FLineInfo.Directories[diridx] + S;
S := CreateAbsolutePath(S2, FCompDir);
if (diridx = 0) and not FileExistsUTF8(S2) and (FLineInfo.FileNames.Count > 0) then // https://bugs.freepascal.org/view.php?id=37658
if (diridx = 0) and (not FileExistsUTF8(S)) and (FLineInfo.FileNames.Count > 0) then // https://gitlab.com/freepascal.org/fpc/source/-/issues/37658 https://bugs.freepascal.org/view.php?id=37658
S := S2;
end
else