aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2024-01-02 04:12:29 +0000
committerMark Johnston <markj@FreeBSD.org>2024-01-09 01:00:31 +0000
commit693dbc0070f97cc6744796d40eeab63e3305492e (patch)
tree73be0041e2b4aa7d551533dc89a5c88f3202a8fb
parentcc8af47b6d4ce9c40ed03ace7c130409fe0962a0 (diff)
downloadsrc-693dbc0070f97cc6744796d40eeab63e3305492e.tar.gz
src-693dbc0070f97cc6744796d40eeab63e3305492e.zip
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 78cd75393ec79565c63927bf200f06f839a1dc05)
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 861fda0931af..1de5741ae207 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -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