[Dwarf-discuss] tag nesting question

Daniel Berlin dberlin
Thu Dec 21 20:21:48 GMT 2006


On 12/21/06, Michael Eager <eager at eagercon.com> wrote:
> Chris Quenelle wrote:
>
> > I think it's a little odd that g++ uses DW_TAG_structure to
> > represent classes instead of DW_TAG_class.  I know they
> > are basically equivalent in C++, but it would be nice to
> > say that only DW_TAG_class could contain DW_TAG_member.
>
> DW_TAG_structure, DW_TAG_class, and DW_TAG_union are all
> essentially identical.  It might be reasonable to deprecate
> the latter two TAGS.

In the specific case of GCC, we'd either have to have a callback to
the C++ FE at debug info output to ask it whether it's struct/class,
or waste a bit in the type structure to store this info.

I posted a patch about 3 years ago that wasted a bit.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7081
and
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01748.html

I never got back to updating it in response to the comments, even
though they were very minor, as i started law school back up again
soon after.

If you really feel like it, you could update this patch and resubmit it.

Nowadays, I think it's a waste of time to differentiate the two :)





More information about the Dwarf-discuss mailing list