From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0CFC6386F824; Fri, 2 Oct 2020 14:42:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CFC6386F824 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: Fri, 02 Oct 2020 14:42:11 +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: ASSIGNED 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: attachments.created 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: Fri, 02 Oct 2020 14:42:12 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26684 --- Comment #10 from Mark Wielaard --- Created attachment 12885 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D12885&action=3Ded= it subrange_type bounds signedness is given by underlying type I was wrong about this: > It has some code for die_unsigned_constant_attribute which relies on > specific FORMs which doesn't handle DW_FORM_implicit_const (and technical= ly > DW_FORM_implicit_const represents a signed value). Ideally libabigail > shouldn't have to deal with forms directly but should be able to rely on = the > dwarf_attr 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_a= ttr > plus dwarf_formudata. It turns out the code that directly inspects the DW_FORMs and (signedness) = is only used by the build_subrange_type code to properly initialize the bound_values. I believe that code is actually wrong. The signedness of the bound_values isn't determined by the specific form used, but by the signedn= ess of the underlying type (if it has one). The attached patch determines the signedness by looking at the underlying type and removes the code that dire= ctly checks specific forms. --=20 You are receiving this mail because: You are on the CC list for the bug.=