]> git.ipfire.org Git - thirdparty/elfutils.git/commit
readelf: Print DW_AT_data_member_location as decimal offset, not hex number.
authorMark Wielaard <mark@klomp.org>
Wed, 3 Apr 2019 14:54:15 +0000 (16:54 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 10 Apr 2019 21:31:23 +0000 (23:31 +0200)
commit384e54bc275941784b6b6756cd0d347caf24a062
tree4e333ec22cdb19e2371df56c98c6b0349effc0a8
parent34ff3ca2e86f8a4915500b92a8e00d6f52aa546c
readelf: Print DW_AT_data_member_location as decimal offset, not hex number.

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>
src/ChangeLog
src/readelf.c