Fix bug in fixed-point handling
authorTom Tromey <tromey@adacore.com>
Tue, 18 Jul 2023 16:02:14 +0000 (10:02 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 31 Jul 2023 16:48:00 +0000 (10:48 -0600)
commitfe34aba06029a86df15742b983cd398580ca3b94
treef283ff018702a3e6feb6ac99bd3772be15bba5f2
parent3d05c80b5dc47de626bed24d2a238e7a3309545e
Fix bug in fixed-point handling

Alexandre Oliva found a bug in gdb's handling of fixed-point -- a
certain Ada fixed-point type would be misintepreted.  The bug was that
the DW_AT_small looked like:

 <1><13cd>: Abbrev Number: 16 (DW_TAG_constant)
    <13ce>   DW_AT_GNU_numerator: 1
    <13cf>   DW_AT_GNU_denominator: 0x8000000000000000

... but gdb interpreted the denominator as a negative value.
gdb/dwarf2/read.c
gdb/testsuite/gdb.ada/fixed_points.exp
gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb