dwarf2sources fails to parse DWARF info when using DWARF-5
Affected images versions
- v2024dev2
Unaffected images versions
- up to v2024dev1
Steps to reproduce
- Build a debian package on v2024dev2 (with gcc-12 which has DWARF-5 enabled by default)
Expected result
- No error is found when running
dh_setup_copyright
Actual result
-
dh_setup_copyright
complains withError: Missing DW_AT_comp_dir
Reproducibility
-
✅ always
Impact of bug
Broken license information for packages.
Root cause
describe in one line what caused the issue to give a hint to product teams whether they may be impacted or not
gcc enabled DWARF-5 by default on version 11 (v2024dev2 has v12 while v2023/v2024dev1 uses v10) which changes the format of DW_AT_comp_dir
(and DW_AT_name
) from DW_FORM_strp
to DW_FORM_line_strp
, thus causing dwarf2sources
to fail to parse the DWARF info.
Outcomes
Management data
This section is for management only, it should be the last one in the description.
/cc @andrunko @em @sagar @sudarshan @wlozano
Phabricator link: https://phabricator.apertis.org/T9837
Edited by Andre Moreira Magalhaes