]> git.ipfire.org Git - thirdparty/elfutils.git/commit
readelf: Print split DWARF CU version, unit type and id
authorMark Wielaard <mark@klomp.org>
Sat, 21 Mar 2026 22:56:58 +0000 (23:56 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 24 Mar 2026 09:43:38 +0000 (10:43 +0100)
commit31e0538df2d76ed3f77ac3bf57d07bded9a93988
treed937f3110ebbdc1c81de3956c1b41dc0330d6cc5
parent9dcad17de8653e61372b715c03dc201d3ba7b449
readelf: Print split DWARF CU version, unit type and id

When printing the split units we reused the version, unit type and id
found in the skeleton unit. The version and id really should match,
but the unit type shouldn't. We could hard code the expected values,
but it is better to look them up explicitly. One testcase needed
updating to show the correct split_compile unit type.

* src/readelf.c (print_debug_units): Call dwarf_cu_die and
dwarf_cu_info to explicitly fetch split_version,
split_unit_type and split_unit_id.
* tests/run-readelf-loc.sh: Adjust Unit type.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/readelf.c
tests/run-readelf-loc.sh