[PATCH] readelf: Print DIE offset in attribute reading error messages.

Mark Wielaard mark@klomp.org
Tue Nov 21 10:21:00 GMT 2017

On Thu, 2017-11-16 at 15:31 +0100, Mark Wielaard wrote:
> On Tue, 2017-10-03 at 16:59 +0200, Mark Wielaard wrote:
> > When processing large files it is useful to know the DIE offset if
> > printing of attributes fails (especially when redirecting the output).
> > With this change the error message looks like:
> > 
> >   eu-readelf: DIE [2aeb8ef1] cannot get attribute value: invalid DWARF
> Got another report about a large debug file where this improved error
> message would have been really handy. So I pushed it to master now.

This has been really useful to debug some DWARF format issues, but it
could be even more useful. Since we know the attribute name and form
(or we would have generated an error earlier) add those to the error
message too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-readelf-Print-attribute-name-and-form-in-error-messa.patch
Type: text/x-patch
Size: 1678 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/elfutils-devel/attachments/20171121/783d072e/attachment.bin>

More information about the Elfutils-devel mailing list