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: 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
> myself.

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
known-elf.

> but in dwgrep I actually need known-dwarf.h,
> as I do some more intricate per-constant processing.
> 
> Opinions?

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.

Cheers,

Mark

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