[all-commits] [llvm/llvm-project] 86f2ec: [llvm][DWARFLinker] Don't attach DW_AT_dwo_id to C...
Michael Buch via All-commits
all-commits at lists.llvm.org
Tue Aug 20 23:29:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86f2ec03f898950e1e41c2205f4cf7c60d118390
https://github.com/llvm/llvm-project/commit/86f2ec03f898950e1e41c2205f4cf7c60d118390
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2024-08-21 (Wed, 21 Aug 2024)
Changed paths:
M llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
M llvm/test/tools/dsymutil/X86/modules.m
Log Message:
-----------
[llvm][DWARFLinker] Don't attach DW_AT_dwo_id to CUs (#105186)
This fixes a verifier error uncovered as a result of
https://github.com/llvm/llvm-project/pull/101775.
When compiling with `-gmodules`, Clang will create a skeleton CU that
contains a `DW_AT_dwo_id` and a `DW_AT_dwo_name` corresponding to the
path of the `.pcm` that carries the type definitions referenced in the
non-skeleton CU (see the [gmodules LLDB
docs](https://lldb.llvm.org/resources/extensions.html) for more
details). The non-skeleton CU will also contain a `DW_AT_dwo_id` that
matches that of the skeleton.
`dsymutil` effectively undoes the `-gmodules` work, replacing all the
module type references with definitions. I.e., we no longer create a
skeleton `.dwo` CU.
Prior to this patch `dsymutil` did not strip out the `DW_AT_dwo_id` on
the non-skeleton CU. This now (since
https://github.com/llvm/llvm-project/pull/101775) causes verification
errors such as:
```
Verifying .debug_names...
error: Name Index @ 0x0: Entry @ 0x9a unable to load .dwo file "None"
for DWARF unit @ 0x0.
error: output verification failed for x86_64
make: *** [a.out.dSYM] Error 1
```
...because the verifier sees the DWO ID but can't find a matching `.dwo`
unit.
This patch simply strips the `DW_AT_dwo_id` from the main CU.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list