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

2017-10-03 Thread Mark Wielaard
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 Signed-off-by: Mark Wielaard --- src/Ch

missing #include in libdw.h?

2017-10-03 Thread Bill Williams
Hi all, libdw.h uses the DW_CIE_ID_64 define from dwarf.h in a macro definition, but does not itself include dwarf.h. This makes the libdw.h header not self-contained if and only if your code uses the dwarf_cfi_cie_p macro. Is this behavior by design, or a bug? --bw