[Dwarf-Discuss] DW_TAG_base_type must have DW_AT_name?
ron.brender at charter.net
Wed Oct 27 14:39:47 PDT 2010
By all means the name of a base type should be "optional". The wording
for base types goes all the way back to V2 and apparently was never
revised in the last two revisions. See also Section 2.15 regarding Names
which clearly states that an entity without a source name does not need
a DW_AT_name attribute. (This Section also goes all the way back to V2
as well, where it was 2.13.)
Ada for one definitely has the concept of anonymous types--types that
have no source names but which nonetheless must be present to properly
describe other entities. So types without names definitely "make sense"
in at least the COBOL and Ada languages--I expect there are others.
Rather than put energy into generating a useless name attribute with the
name "__unknown++", it would be good put energy into generating a
DW_AT_description attribute that provides use clues about what is going on.
On 10/27/2010 1:03 PM, Roland McGrath wrote:
> By the general wording of DWARF, I think it is moderately clear that
> something should only have a DW_AT_name if there is a single
> source-language identifier that names the entity (in this case, the type).
> If not, there should be no DW_AT_name. But, as you say, such a case is
> exactly why DW_AT_description exists--a useful indication for humans of
> what the entity is there for, but not a literal source-language name for it.
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
More information about the Dwarf-Discuss