Issue 240618.2: DW_AT_rnglists_base missing
| Author: | David Anderson |
|---|---|
| Champion: | |
| Date submitted: | 2024-06-18 |
| Date revised: | 2025-01-28 |
| Date closed: | 2025-03-13 |
| Type: | Clarification |
| Status: | Withdrawn |
| DWARF version: | 6 |
Comparing 2024-09-24 with latest. [ Return to the latest version ]
## BACKGROUND
References are to DWARF5 unless otherwise indicated.
If a split-full CU uses `DW_FORM_rnglistx`, is a `DW_AT_rnglists_base` required? Apparently not, since in cases I have seen in object files with a single rnglist in `.debug_rnglists.dwo` there is no `DW_AT_rnglists_base`. The operative assumption seems to be that consumers will simply
assume size-of-rnglists-header of the initial `.debug_rnglists.dwo` contribution
assume zero as the (missing) `DW_AT_rnglists_base`.
as the (missing) `DW_AT_rnglists_base`.
Seen in llvm and gcc.
Similarly for `.debug_loclists[.dwo]` and `DW_AT_loclists_base`.
The intent of this proposal is to get clarity.
The intent of this proposal is to allow this common practice as correct dwarf.
An alternative version could state: > If a Split Full Compilation Unit > refers to `.debug_rnglists.dwo` > with `DW_FORM_rnglistx` > the CU DIE must have a `DW_AT_rnglists_base` > attribute.
## PROPOSAL
At the end Sec F.1 Overview just before Table F.1:
Section 7.28 Range List Table Following the last paragraph before Section 7.29:
> If a Split Full Compilation Unit
> If a Split Full Compilation Unit
> refers to `.debug_rnglists.dwo`
> refers to `.debug_rnglists.dwo`
> with `DW_FORM_rnglistx`
> with `DW_FORM_rnglistx`
> and the correct `DW_AT_rnglists_base`
> and the correct `DW_AT_rnglists_base` > would be size-of-rnglists-header > of the initial contribution to > `.debug_rnglists.dwo`,
> would be zero, the `DW_AT_rnglists_base`
> the `DW_AT_rnglists_base`
> may be omitted.
> may be omitted. > In a dwp package file (See F.3 Package File Example) > a `.debug_cu_index` or `.debug_tu_index` > entry `DW_SECT_RNGLISTS` makes rnglists base unnecessary > by providing the offset of the contribution to >`.debug_rnglists.dwo`. Section 7.29 Location List Table Following the last paragraph before Section 7.30: > If a Split Full Compilation Unit > refers to `.debug_loclists.dwo` > with `DW_FORM_loclistx` > and the correct `DW_AT_loclists_base` > would be size-of-loclists-header > of the initial contribution to > `.debug_loclists.dwo`, > the `DW_AT_loclists_base` > may be omitted. > In a dwp package file (See F.3 Package File Example) > a `.debug_cu_index` or `.debug_tu_index` > entry `DW_SECT_LOCLISTS` makes loclists base unnecessary > by providing the offset of the contribution to >`.debug_loclists.dwo`. --- 2024-06-18: [Original proposal][orig]. 2024-09-24: [Revised][diff1]. 2025-01-11: [Revised][diff2]. 2025-03-13: Withdrawn in favor of [250311.1][250311.1]. [250311.1]: https://dwarfstd.org/issues/250311.1.html