This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 1/2] Show contents NT_SIGINFO core note in readelf
- From: Petr Machata <pmachata at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 02 Oct 2013 12:44:33 +0200
- Subject: Re: [PATCH 1/2] Show contents NT_SIGINFO core note in readelf
Roland McGrath <email@example.com> writes:
> I'm not very happy about readelf encoding all this format knowledge.
> That's what we have libebl for. If the Ebl_Core_Item format needs to be
> extended to handle these new note types, then that is what we should be
> doing rather than hard-coding format knowledge in readelf.
FWIW, yesterday I spent some time playing with the idea of representing
this with typed Dwarf expressions. This would work, I think, but it's
verbose, presumably error-prone, and many things that are trivial in C
end up being pain--such as looking up terminating zero in a list of
strings (as comes up in NT_FILE). Some of that could be alleviated by
having a library of common Dwarf subprograms, but at that point the
whole scheme gets fairly complex. Moreover, it's not clear we'd get
anything much out of this--we could just as well just stick a callback
pointer to the item structure. So, scratch.