DWARF Standard


100430.2 Tom Tromey debug_aranges and address-less CUs Improvement Rejected Cary Coutant

Section 6.1.2, pg 121

Currently, some compilers (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42288)
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.

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2017 by DWARF Standards Committee.