diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2022-03-15 08:53:27 +0800 |
---|---|---|
committer | Tiezhu Yang <yangtiezhu@loongson.cn> | 2022-03-15 09:23:48 +0800 |
commit | e34f44e1bf02c91825da11d47b3fadebc5bef451 (patch) | |
tree | d56414defb439d449b5b6f8bcb9f9505c4c902e3 | |
parent | bf573a0cc6e43e7630b4b22f59006116a31d28ff (diff) | |
download | gdb-e34f44e1bf02c91825da11d47b3fadebc5bef451.zip gdb-e34f44e1bf02c91825da11d47b3fadebc5bef451.tar.gz gdb-e34f44e1bf02c91825da11d47b3fadebc5bef451.tar.bz2 |
gdb: LoongArch: fix failed testcases in gdb.base/align-c.exp
When execute the following command on LoongArch:
make check-gdb TESTS="gdb.base/align-c.exp"
there exist some failed testcases:
...
FAIL: gdb.base/align-c.exp: print _Alignof(struct align_pair_long_double_x_float)
FAIL: gdb.base/align-c.exp: print _Alignof(struct align_pair_long_double_x_double)
FAIL: gdb.base/align-c.exp: print _Alignof(struct align_pair_long_double_x_long_double)
...
According to LoongArch ELF ABI specification [1], set the target data types
of floating-point to fix the above failed testcases.
[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
-rw-r--r-- | gdb/loongarch-tdep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c index ffcff03..0eda163 100644 --- a/gdb/loongarch-tdep.c +++ b/gdb/loongarch-tdep.c @@ -268,6 +268,10 @@ loongarch_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_int_bit (gdbarch, 32); set_gdbarch_long_bit (gdbarch, info.bfd_arch_info->bits_per_address); set_gdbarch_long_long_bit (gdbarch, 64); + set_gdbarch_float_bit (gdbarch, 32); + set_gdbarch_double_bit (gdbarch, 64); + set_gdbarch_long_double_bit (gdbarch, 128); + set_gdbarch_long_double_format (gdbarch, floatformats_ia64_quad); set_gdbarch_ptr_bit (gdbarch, info.bfd_arch_info->bits_per_address); set_gdbarch_char_signed (gdbarch, 0); |