This is the mail archive of the
mailing list for the binutils project.
Re: RFA: consolidate DWARF strings into libiberty
- From: Tom Tromey <tromey at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Thu, 15 Mar 2012 12:41:54 -0600
- Subject: Re: RFA: consolidate DWARF strings into libiberty
- References: <firstname.lastname@example.org> <201203151833.q2FIXeOs003077__40387.email@example.com>
>>>>> "DJ" == DJ Delorie <firstname.lastname@example.org> writes:
DJ> Sigh, libiberty is supposed to be a portability library, not a
DJ> kitchen-sink for common stuff. Should I give up that premise? Or
DJ> should we consider a common dwarf2 helper library, and move even more
DJ> of the dwarf2 code into it?
My reasoning was:
I would have put it somewhere else, but there is nowhere else to put it.
Making a new library for this one file seemed like overkill.
Finally, there is already stuff in libiberty not related to
portability. E.g., hashtab or the demangler.
Tom> First, you'll notice that the first constant for a given enum is
Tom> defined using a separate macro name. I couldn't think of a better
Tom> way to avoid the "trailing ',' in an enum" warning -- one element
Tom> must be distinguished, so I chose the first.
DJ> I typically terminate the list with a "FOO_MAX" enum, which is going
DJ> to need to be handled differently anyway.
I usually do that to, but I wanted this change not to affect the
contents of the defined enums.
Tom> Also, you'll see that the names passed to the macros start with an "_".
DJ> Beware you're not violating (or causing to violate) some ISO namespace
DJ> requirement for identifiers starting with underscores.
Yeah, I didn't consider that.
I guess I can just put the whole DW_TAG_ prefix in there.
That isn't a big deal. Or if you have some other suggestion, I can