From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11616 invoked by alias); 15 May 2019 18:02:40 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 11339 invoked by uid 48); 15 May 2019 18:02:36 -0000 From: "tromey at sourceware dot org" To: elfutils-devel@sourceware.org Subject: [Bug tools/24550] eu-readelf does not know about DW_AT_GNU_{bias,numerator,denumerator} Date: Wed, 15 May 2019 18:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org 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-SW-Source: 2019-q2/txt/msg00083.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24550 --- Comment #3 from Tom Tromey --- > > There are three things that surprised me about this. > > First that the byte_size is 1, are these types really using a full byte= and > > not 2 or 6 bits? >=20 > I'm not totally sure what is going on here. Maybe the type needs to be > used in a packed record to see it actually shrink? I will see if I can w= rite > a test for this. Thanks for noticing this. I think the DWARF is incorrect here in a few ways -- I am going to update the internal bug about it to get it fixed. Meanwhile here is the updated test case I am using -- Copyright 2019 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . procedure Bias is type Small is range -7 .. -4; for Small'Size use 2; Y : Small :=3D -5; Y1 : Small :=3D -7; type Byte is mod 256; type Repeat_Count_T is new Byte range 1 .. 2 ** 6; for Repeat_Count_T'Size use 6; X : Repeat_Count_T :=3D 64; X1 : Repeat_Count_T :=3D 1; type Char_Range is range 65 .. 68; for Char_Range'Size use 2; Cval : Char_Range :=3D 65; type SomePackedRecord is record R: Small; S: Small; end record; pragma Pack (SomePackedRecord); SPR : SomePackedRecord :=3D (R =3D> -4, S =3D> -5); type Packed_Array is array (1 .. 3) of Small; pragma pack (Packed_Array); A : Packed_Array :=3D (-7, -5, -4); begin null; end Bias; --=20 You are receiving this mail because: You are on the CC list for the bug.