Tom> Consider checking that every CU has an arange entry.
Tom> This is not strictly required, but it is nicer for consumers.
Tom> ISTR filing a bug about this in GCC bugzilla.
[...]
Roland> Every CU that has any PCs (i.e. compile_unit has low_pc,
Roland> high_pc, or ranges attributes at all), that is. In today's GCC,
Roland> I'm not sure there is ever a CU with no PCs at all, except for a
Roland> type_unit (-gdwarf-4).
Make a file that just has "int x;" in it, then compile with -g.
GCC won't emit a .debug_aranges.
I think it ought to emit an empty one, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42288
for the rationale.
Tom