ctfconvert: Handle DW_AT_data_bit_offset

This attribute is new in DWARF 4 and supersedes DW_AT_bit_offset.

PR:		276059
Reported by:	rscheff
Tested by:	rscheff
MFC after:	1 week

(cherry picked from commit 78cd75393e)
This commit is contained in:
Mark Johnston 2024-01-01 23:12:29 -05:00
parent cc8af47b6d
commit 693dbc0070

View File

@ -1004,7 +1004,9 @@ die_sou_create(dwarf_t *dw, Dwarf_Die str, Dwarf_Off off, tdesc_t *tdp,
else
ml->ml_size = tdesc_bitsize(ml->ml_type);
if (die_unsigned(dw, mem, DW_AT_bit_offset, &bitoff, 0)) {
if (die_unsigned(dw, mem, DW_AT_data_bit_offset, &bitoff, 0)) {
ml->ml_offset += bitoff;
} else if (die_unsigned(dw, mem, DW_AT_bit_offset, &bitoff, 0)) {
#if BYTE_ORDER == _BIG_ENDIAN
ml->ml_offset += bitoff;
#else