This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: readelf vs dwarfstrings


The place to start for master is just to update the readelf.c tables
without reorganizing anything.  Commit that first.

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.

After we've cleaned up all the existing stuff, I'm not sure there will be
any pure C cases other than readelf.  If there are, we can think about it.
If not, then it will probably make sense to put the known-dwarf.h
generation stuff onto master and use it directly in readelf.c to replace
the existing hand-maintained tables.


Thanks,
Roland

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