[Bug default/26684] abidiff says that some bit field elements missing in version of binary with dwarf5 debuginfo.

mark at klomp dot org sourceware-bugzilla@sourceware.org
Fri Oct 2 14:42:11 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=26684

--- Comment #10 from Mark Wielaard <mark at klomp dot org> ---
Created attachment 12885
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12885&action=edit
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 technically
> 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 
> DW_AT_byte_size and DW_AT_bit_size should probably simply use and dwarf_attr
> 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 signedness
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 directly
checks specific forms.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libabigail mailing list