Issue 100430.2: debug_aranges and address-less CUs

Author: Tom Tromey
Champion: Cary Coutant
Date submitted: 2010-04-30
Date revised:
Date closed:
Type: Improvement
Status: Rejected
DWARF Version: 5
Section 6.1.2, pg 121

Currently, some compilers (
will not generate a .debug_aranges section for a CU that has no address
ranges.  However, this means that a reader has no way to distinguish
whether aranges is missing because the CU does not have ranges, or because
the writer failed to emit it for some reason.

I think it would be good if a future DWARF mentioned this issue and
recommended that writers emit an empty aranges in this case.

Proposed changes:

Section 6.1.2 (page 114)

Add the following paragraph as non-normative text:

"If a compiler generates .debug_aranges sections, it should generate them
for all compilation units, even when a compilation unit has no address
ranges. This allows a consumer to distinguish between a compilation unit
that has no ranges from a compilation unit generated by a compiler that
does not generate .debug_aranges sections."

Updated: 12/17/2013.
1/21/2013 - Rejected -- Recommend adding this as "best practice" on the wiki.