On Thu, 2011-02-24 at 14:36 -0800, Roland McGrath wrote:
The place to start for master is just to update the readelf.c tables
without reorganizing anything. Commit that first.
OK, pushed that. And a matching commit to the dwarf branch, just to make
sure that for now they are in sync.
On the dwarf branch, we should be getting rid of all hand-maintained
tables
entirely. We have libdw/known-dwarf.h, which is updated automagically
under --enable-maintainer-mode. Anything using C++ code, such as
dwarflint, should be using the existing interfaces built from that, like
dwarf::tags::identifier and dwarf::attributes::identifier (or ::name,
depending what output you want). There is also dwarf::forms and
dwarf::ops. The attribute-value name tables are only available via
dwarf*::dwarf_enum::to_string. It's possible we need to add something to
make those easier to use outside their uses in ...::attribute::to_string.
But off hand it looks to me like you can just instantiate a
dwarf_{data,edit}::dwarf_enum object and use the to_string, identifier, or
name methods on it.
I cleaned up the usage in the tests that I added. Haven't gone over the
other usage in dwarflint. Petr let me know if you want me to do that.
Thanks,
Mark