The data_member_location attribute was printed as a hex number, but other
constant attributes like bit_offset, byte_size or alignment were printed
as decimal numbers. This is confusing.
The reason that data_member_location was printed as hex seemed to have
been because it could also have been a location description, in which
case it might have been of DW_FORM_loclist, for which it makes sense
to print as hex offset (between square brackets).
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2019-04-03 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Print DW_AT_data_member_location as
+ decimal offset, not hex number.
+
2019-03-29 Mark Wielaard <mark@klomp.org>
* readelf.c (print_debug_macinfo_section): Check cus[0] is not the
|| (form != DW_FORM_data4 && form != DW_FORM_data8)))
{
if (!cbargs->silent)
- printf (" %*s%-20s (%s) %" PRIxMAX "\n",
+ printf (" %*s%-20s (%s) %" PRIuMAX "\n",
(int) (level * 2), "", dwarf_attr_name (attr),
dwarf_form_name (form), (uintmax_t) num);
return DWARF_CB_OK;