Handle 128-bit constants for fixed point
authorTom Tromey <tromey@adacore.com>
Wed, 9 Dec 2020 21:12:58 +0000 (14:12 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 9 Dec 2020 21:12:58 +0000 (14:12 -0700)
commit5cde1d8222a849256f684363f38a6423dea9be74
tree6a527c12bcbaf7e4529561f682e49b23124da977
parentd9c3a9c03692c12b472c555f71fe7a2444a24d46
Handle 128-bit constants for fixed point

In some cases, GNAT can emit 128-bit constants for fixed-point types.
This patch changes gdb to handle this scenario, by changing the
low-level rational-reading functions in dwarf2/read.c to work directly
with gdb_mpz values.  (I'm not sure offhand if these 128-bit patches
have gone into upstream GCC yet -- but they will eventually, and
meanwhile I think it should be clear that this patch is otherwise
harmless.)

gdb/ChangeLog
2020-12-09  Tom Tromey  <tromey@adacore.com>

* dwarf2/read.c (get_dwarf2_rational_constant): Change "numerator"
and "denominator" to gdb_mpz.  Handle block forms.
(get_dwarf2_unsigned_rational_constant): Change "numerator" and
"denominator" to gdb_mpz.
(finish_fixed_point_type): Update.
(has_zero_over_zero_small_attribute): Update.
gdb/ChangeLog
gdb/dwarf2/read.c