From: "dodji at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/27334] New: Track bitfield size change
Date: Wed, 03 Feb 2021 13:07:45 +0000 [thread overview]
Message-ID: <bug-27334-9487@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=27334
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.
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 how
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2021-02-03 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 13:07 dodji at redhat dot com [this message]
2021-02-03 13:08 ` [Bug default/27334] " dodji at redhat dot com
2021-02-03 16:25 ` woodard at redhat dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-27334-9487@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).