This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Don't join DW_AT_comp_dir and directories[0] for DWARF v5 line tables
ClosedPublic

Authored by MaskRay on Aug 12 2022, 1:34 PM.

Details

Summary

DWARF v5 6.2.4 The Line Number Program Header says:

The first entry is the current directory of the compilation. Each additional
path entry is either a full path name or is relative to the current directory of
the compilation.

When forming a path, relative DW_AT_comp_dir and directories[0] are not supposed
to be joined together. Fix getFileNameByIndex to special case DWARF v5 DirIdx == 0.

Diff Detail

Event Timeline

MaskRay created this revision.Aug 12 2022, 1:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 1:34 PM
MaskRay requested review of this revision.Aug 12 2022, 1:34 PM
Herald added a project: Restricted Project. · View Herald Transcript
dblaikie accepted this revision.Aug 12 2022, 1:52 PM
dblaikie added a subscriber: dblaikie.

Looks good, thanks!

This revision is now accepted and ready to land.Aug 12 2022, 1:52 PM
This revision was landed with ongoing or failed builds.Aug 12 2022, 2:02 PM
This revision was automatically updated to reflect the committed changes.