[Dwarf-Discuss] DW_TAG_base_type must have DW_AT_name?

Robinson, Paul T (JCTL-NonStop) paul.t.robinson at hp.com
Wed Oct 27 12:52:43 PDT 2010

Roland McGrath wrote:

>> We've added recently code into GCC so that we generate "__unknown__"
>> name for base types if there is no real user name for these language
>> lawyering reasons, if there is general agreement this can be changed
>> into "may have" I'd be more than happy to change it back.
>IMHO this comes under the general permissiveness rule of DWARF.
>I see no reason to emit entirely useless attributes in any case.

I agree with the sentiment, and in general I think anything that a
producer is likely to want to omit would end up being no problem.
I just don't see anything in the spec to support the position.

The "general permissiveness rule" is pretty clear with respect to
supplying attributes that aren't otherwise specified for a DIE
(see sections 1.3 and 2.1).

It is not clear it works in the other direction, omitting things
at the discretion of the producer even when the standard uses
language such as "this HAS that."


More information about the Dwarf-Discuss mailing list