diff options
author | Luis Machado <luis.machado@linaro.org> | 2021-04-14 11:20:18 -0300 |
---|---|---|
committer | Luis Machado <luis.machado@linaro.org> | 2021-04-16 11:14:16 -0300 |
commit | 1b6b755e91408011fa74f0a245369c1979586f9e (patch) | |
tree | 6e845854e05071e891c236777d37a8c8b573ea86 /gdb/ChangeLog | |
parent | 6f8f6017a0c4e22c6417c597c31b0a937d148a39 (diff) | |
download | gdb-1b6b755e91408011fa74f0a245369c1979586f9e.zip gdb-1b6b755e91408011fa74f0a245369c1979586f9e.tar.gz gdb-1b6b755e91408011fa74f0a245369c1979586f9e.tar.bz2 |
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.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2a8ca58..c8630a4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-04-16 Luis Machado <luis.machado@linaro.org> + + * arch-utils.c (default_floatformat_for_type): Handle bfloat16. + 2021-04-15 John Baldwin <jhb@FreeBSD.org> * fbsd-nat.c (fbsd_lwp_debug_printf, fbsd_nat_debug_printf): New, |