Handle half-float in 'x' command
authorTom Tromey <tromey@adacore.com>
Fri, 24 Feb 2023 16:19:32 +0000 (09:19 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 2 Mar 2023 15:49:37 +0000 (08:49 -0700)
commit70728e1d396475e8e630bfdd3fb8e8c8211bdbbd
treec4b8674468bb5ea491439c1bc4870ab2ad9c73ec
parent2641391a87d5e6029cb1f083fd42926f668094eb
Handle half-float in 'x' command

Using 'x/hf' should print bytes as float16, but instead it currently
prints as an integer.  I tracked this down to a missing case in
float_type_from_length.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30161
Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/printcmd.c
gdb/testsuite/gdb.dwarf2/dw2-bfloat16.c [new file with mode: 0644]
gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp