[Bug tools/24550] eu-readelf does not know about DW_AT_GNU_{bias,numerator,denumerator}
mark at klomp dot org
sourceware-bugzilla@sourceware.org
Tue May 14 18:36:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=24550
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
Summary|eu-readelf does not know |eu-readelf does not know
|about DW_AT_GNU_bias |about
| |DW_AT_GNU_{bias,numerator,d
| |enumerator}
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
We are also missing GNU_AT_GNU_numerator and GNU_AT_GNU_denominator.
In theory all that is needed is add them to dwarf.h.
Since they are simple constant attributes.
diff --git a/libdw/dwarf.h b/libdw/dwarf.h
index dc5973352..71ca2baae 100644
--- a/libdw/dwarf.h
+++ b/libdw/dwarf.h
@@ -351,6 +351,12 @@ enum
DW_AT_GNU_pubnames = 0x2134,
DW_AT_GNU_pubtypes = 0x2135,
+ /* https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator */
+ DW_AT_GNU_numerator = 0x2303,
+ DW_AT_GNU_denominator = 0x2304,
+ /* https://gcc.gnu.org/wiki/DW_AT_GNU_bias */
+ DW_AT_GNU_bias = 0x2305,
+
DW_AT_hi_user = 0x3fff
};
But I want to make sure we get the type/signedness right.
Could you help me with creating gnat examples that compile and show their
usage?
If I try to compile your example I get two warnings:
tt.adb:4:04: warning: size clause forces biased representation for "Small"
tt.adb:8:03: warning: size clause forces biased representation for
"Repeat_Count_T"
Are those expected?
Also the subranges come out as:
[ 4e] subrange_type abbrev: 3
lower_bound (sdata) -7
upper_bound (sdata) -4
GNU_bias (sdata) -7
name (strp) "tt__small"
type (ref4) [ 8d]
[ 8d] base_type abbrev: 7
byte_size (data1) 1
encoding (data1) signed (5)
name (strp) "tt__TsmallB"
artificial (flag_present) yes
and
[ 6d] subrange_type abbrev: 6
upper_bound (sdata) 64
GNU_bias (sdata) 1
name (strp) "tt__repeat_count_t"
type (ref4) [ 94]
[ 94] base_type abbrev: 7
byte_size (data1) 1
encoding (data1) signed (5)
name (strp) "tt__Trepeat_count_tB"
artificial (flag_present) yes
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?
And second that the bias is on the subrange_type and not the base_type. Is that
intended?
Finally, why is the last type signed?
Also could you help me create an compilable example of
https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator
Thanks,
Mark
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel
mailing list