Print bfloat16 DWARF types correctly
Even if the DWARF information contains a bfloat16 base type (__bf16), a
variable of such type will still be printed using the IEEE half float format,
which is wrong.
This patch teaches GDB how to pick the bfloat16 format for __bf16 types in
DWARF (based on the base type name) and uses IEEE half float for all the other
16-bit float formats.
Tested on aarch64-linux/x86_64-linux.
OK?
gdb/ChangeLog:
2021-04-16 Luis Machado <luis.machado@linaro.org>
* arch-utils.c (default_floatformat_for_type): Handle bfloat16.
gdb/testsuite:
2021-04-16 Luis Machado <luis.machado@linaro.org>
* gdb.dwarf2/dw2-bfloat16.exp: New file.