From 514157160898ed805b6c09ac4d18b14044ffea56 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 29 Jan 2025 11:20:07 +0100 Subject: [PATCH] FpDebug: improve loading DWARF line info. Fix workaround for FPC issue 37658 / check the expanded FileName --- components/fpdebug/fpdbgdwarfdataclasses.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fpdebug/fpdbgdwarfdataclasses.pas b/components/fpdebug/fpdbgdwarfdataclasses.pas index 1e73afd99c..d25a55ddc6 100644 --- a/components/fpdebug/fpdbgdwarfdataclasses.pas +++ b/components/fpdebug/fpdbgdwarfdataclasses.pas @@ -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