readelf: Decode DW_AT_discr_list block attributes.
authorMark Wielaard <mark@klomp.org>
Sun, 5 May 2019 21:18:36 +0000 (23:18 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 14 May 2019 18:52:59 +0000 (20:52 +0200)
commit643cbb275d65533472c0f53391f9fc1d5d9a2efc
tree9358db34cac91f030d83f846b8b65462172fe325
parent7d029dc4585f84937a9386dc6f7ce82fbe2e1e21
readelf: Decode DW_AT_discr_list block attributes.

Decode DW_AT_descr_list blocks using the DW_DSC values.
This requires knowing the signedness of the discriminant.
Which means the attr_callback function needs access to the
parent DIE. Pass the whole DIE path, plus the current level.
That way the type of the discriminant can be looked up in
the variant_part (parent) DIE of the variant DIE (which has
the discr_list attribute).

Add a testcase using both signed and unsigned discriminants.

https://sourceware.org/bugzilla/show_bug.cgi?id=24509

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c
tests/ChangeLog
tests/Makefile.am
tests/run-readelf-discr.sh [new file with mode: 0755]
tests/testfile-rng.debug.bz2 [new file with mode: 0644]
tests/testfile-urng.debug.bz2 [new file with mode: 0644]