Fix bug in ada_print_floating
authorTom Tromey <tromey@adacore.com>
Wed, 16 Feb 2022 19:33:45 +0000 (12:33 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 7 Mar 2022 15:27:38 +0000 (08:27 -0700)
commitaacf24b4db3422632d6b62d473faf71f4e737072
treee9eb89f6b38799c82634bd6d664eb0c6fa1b7202
parent63fc2437deda87a566059444630ccc402945ae99
Fix bug in ada_print_floating

ada_print_floating rewrites a floating-point string representation to
conform to Ada syntax.  However, if you managed to get a floating
point error, you might see:

    (gdb) print whatever
    $2 = <invalid float valu.0e>

What's happening here is that ada_print_floating doesn't recognize
this error case, and proceeds to modify the error text.

This patch fixes this problem.
gdb/ada-valprint.c
gdb/testsuite/gdb.ada/float-bits.exp