Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2024 01:00:21 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 009c8a3d2d76 - stable/14 - ctfconvert: Handle DW_AT_data_bit_offset
Message-ID:  <202401090100.40910L45072259@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=009c8a3d2d76ed8bedc5ea0316979f18f9ae2791

commit 009c8a3d2d76ed8bedc5ea0316979f18f9ae2791
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-01-02 04:12:29 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-09 00:59:54 +0000

    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)
---
 cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index ec5a3c58856d..42faaad65db5 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401090100.40910L45072259>