991129.1 B A D. Anderson Editorial Pubnames and aranges headers

Proposed: Change pubnames and aranges headers to
say specifically they have the offset of a compilation
unit header, and the set entry descriptions to say they
are each the offset from the cu-header to a DIE
with information about the pubname (arange needs no
wording change for set entries).

Similarly for .debug_aranges.

Specifically, for the pubnames header it currently says

"The table consists of sets of variable length entries, each
set describing the names of global objects whose definitions
or declarations are represented by debugging information
entries owned by a single compilation unit. Each set
begins with a header consisting of 4 values: the total length
of the entries for that set, not including the length field
itself, a version number, the offset from the beginning of
the .debug_info section of the compilation unit entry
referenced by the set, and the size in bytes of the contents
of the .debug_info section generated to represent that set."

The problem is that "the offset from the beginning of
the .debug_info section of the compilation unit entry
referenced by the set" is not as clear as it might be.
(at least at one time it must have been unclear,
though I confess at this time I have trouble understanding
why sgi (and cygnus) interpreted the section the way we did).

Section 3.1 is titled "Compilation Unit Entries"
but it talks about a compilation unit DIE contents, not
at all about compilation unit headers.

SGI, (and apparently cygnus, from a small
test I just did) interprets the offset in the
pubnames header as the offset of the compilation unit header
of a compilation unit in the .debug_info section.
Not the offset of a DW_TAG_compile_unit DIE.
(I just checked a recent gcc/dwarf2out.c and there are no
specific comments there, just the use of a label
which labels the CU header).

Similarly for .debug_aranges.

The document should say compilation-unit-header specifically, not use
the "compilation unit entry" terminology in section 6.1.

This issue came to the fore due to a restructuring of sgi's libdwarf
code which had been written to assume one interpretation of section

For sgi and cygnus, the per-pubnames offset is the
offset from the cu-header to the pubname's DIE.

Editorial:  All references to offsets of Compilation Unit Entries should be offsets from the Compilation
Unit Header.