This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] DWARFv5. Handle DW_TAG_atomic_type _Atomic type modifier.


> It is certainly reasonable to add new vendor attributes or tags, but
> only for "independent" tags or attributes that consumers can easily
> ignore if they aren't recognized. There is no mechanism for introducing
> new vendor type qualifier tags like these in DWARF. The issue is that a
> consumer cannot detect that a tag is just a type qualifier which can be
> ignored if not recognized (all type qualifiers do use DW_AT_type to
> point to the underlying type, but so do other non-qualifier tags that
> have completely different semantics). So if we would add a vendor tag
> and GCC starts annotating/wrapping other type tags with
> DW_TAG_GNU_atomic_type then consumers will start failing to find the
> underlying type (I already had to patch up various consumers when I
> added DW_TAG_restrict_type, which has been standard since DWARFv3). So
> if we would introduce a vendor extension to mark atomic types, then it
> would have to work differently from the proposed type qualifier tag.
>

FWIW a new vendor tag, even for such as this, would be a better
solution. The numbers you choose for any attributes, if the proposals
are accepted, would not necessarily be the same ones you chose. That
confusion between numbers in consumers is worse than an unknown tag
IMO.

-eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]