This is the mail archive of the
mailing list for the elfutils project.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 11 Mar 2015 12:50:59 +0100
- Subject: Re: known-dwarf.h
On Tue, 2015-03-03 at 13:46 +0100, Petr Machata wrote:
> known-dwarf.h is an extremely handy header file. I regularly find
> myself replicating it in my ELF/DWARF-related projects. In dwgrep
> I simply copy over known-dwarf.awk as such and generate the header
And you have a known-elf.awk. elfutils really should steal that one.
(Or just completely adopt your dw-tools :)
> Obviously that's not ideal. Could known-dwarf.h be shipped? In
> dwlocstat I really only use it to convert constants to strings
> representing their names
We probably should just introduce real string functions. They are useful
on their own. I had a proposal for them some time ago. I'll find them
and post a proposal. And maybe we can add similar ones based on
> but in dwgrep I actually need known-dwarf.h,
> as I do some more intricate per-constant processing.
I am not entirely against it. But I am somewhat hesitant because it is
hard to define what interface we really are exporting with them.
Currently they really are implementation details. And they are not
completely consistent. There are "bare" constant KNOWNs and others with
DESCriptions. Some even mix the two. So we should first decide which to
export and make them consistent (never or always include the description
string). And there is no documentation for them. There should at least
be a description of how to use them correctly.