From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AFA5D385EC54; Thu, 1 Oct 2020 20:50:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFA5D385EC54 From: "mark at klomp dot org" To: libabigail@sourceware.org Subject: [Bug default/26684] abidiff says that some bit field elements missing in version of binary with dwarf5 debuginfo. Date: Thu, 01 Oct 2020 20:50:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 20:50:22 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26684 --- Comment #7 from Mark Wielaard --- There are a couple of issues in the libabigail code. It has some code for die_unsigned_constant_attribute which relies on specif= ic FORMs which doesn't handle DW_FORM_implicit_const (and technically DW_FORM_implicit_const represents a signed value). Ideally libabigail shoul= dn't have to deal with forms directly but should be able to rely on the dwarf_at= tr functions in libdw to get attribute values so it doesn't have to deal with = any particular data representation. In particular handling of=20 DW_AT_byte_size and DW_AT_bit_size should probably simply use and dwarf_attr plus dwarf_formudata. Secondly in libabigail only handles DW_AT_data_member_location, but not DW_AT_data_bit_offset. Technically DW_AT_data_bit_offset is already in DWAR= F4, but gcc only outputs it for DWARF5 (from gcc/dwarf2out.c): /* While DW_AT_data_bit_offset has been added already in DWARF4, e.g. GDB only added support to it in November 2016. For DWARF5 we need newer debug info consumers anyway. We might change this to dwarf_version >=3D 4 once most consumers catched up. */ Note that if there is a DW_AT_data_bit_offset instead of a DW_AT_data_member_location then there will be no DW_AT_byte_size and no DW_AT_bit_offset. --=20 You are receiving this mail because: You are on the CC list for the bug.=