From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2B316398EC2C; Wed, 3 Feb 2021 13:07:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B316398EC2C From: "dodji at redhat dot com" To: libabigail@sourceware.org Subject: [Bug default/27334] New: Track bitfield size change Date: Wed, 03 Feb 2021 13:07:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: dodji at redhat dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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: Wed, 03 Feb 2021 13:07:45 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27334 Bug ID: 27334 Summary: Track bitfield size change Product: libabigail Version: unspecified Status: NEW Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: dodji at redhat dot com CC: libabigail at sourceware dot org Target Milestone: --- In DWARF, the bitfield-ness is a property of the data member. For instance consider this type: struct S { int m; }; Here is what its Debug Information Entry, from DWARF would look like: [ 2d] structure_type abbrev: 2 name (string) "S" byte_size (data1) 4 decl_file (data1) foo.c (1) decl_line (data1) 1 decl_column (data1) 8 sibling (ref4) [ 47] [ 38] member abbrev: 3 name (string) "m" decl_file (data1) foo.c (1) decl_line (data1) 3 decl_column (data1) 7 type (ref4) [ 47] byte_size (data1) 4 bit_size (data1) 2 bit_offset (data1) 30 data_member_location (data1) 0 [ 47] base_type abbrev: 4 byte_size (data1) 4 encoding (data1) signed (5) name (string) "int" There, you can see that the data member "m" has a DW_AT_bit_size attribute which value is set to 2. It also has a DW_AT_byte_size attribute set to 4.= =20 It's type however, is an integer, of size 4, defined at offset 0x47. The presence of the DW_AT_{bit,byte}_size attributes on the DIE of "m" is h= ow we detect that "m" is a bitfield. Today, libabigail doesn't record that information in its internal representation. It ought to represent it and it ought to detect and report changes to that information. It also need to save that information into the ABIXML textual representation and should be able to read it back from it. --=20 You are receiving this mail because: You are on the CC list for the bug.=