mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
gdb: LoongArch: Change default char data type to signed
According to "Procedure Call Standard for the LoongArch Architecture" [1], for all base ABI types of LoongArch, the char data type in C is signed by default, so change the char data type to signed in gdb/loongarch-tdep.c. Before this patch: make check-gdb TESTS="gdb.base/sizeof.exp" === gdb Summary === # of expected passes 75 # of unexpected failures 1 make check-gdb TESTS="gdb.base/charset.exp" === gdb Summary === # of expected passes 277 # of unexpected failures 6 # of unsupported tests 1 After this patch: make check-gdb TESTS="gdb.base/sizeof.exp" === gdb Summary === # of expected passes 76 make check-gdb TESTS="gdb.base/charset.exp" === gdb Summary === # of expected passes 283 # of unsupported tests 1 [1] https://github.com/loongson/la-abi-specs/blob/release/lapcs.adoc#appendix-c-data-types-and-machine-data-types Signed-off-by: Hui Li <lihui@loongson.cn> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
This commit is contained in:
@@ -2176,7 +2176,7 @@ loongarch_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
set_gdbarch_long_double_bit (gdbarch, 128);
|
||||
set_gdbarch_long_double_format (gdbarch, floatformats_ieee_quad);
|
||||
set_gdbarch_ptr_bit (gdbarch, info.bfd_arch_info->bits_per_address);
|
||||
set_gdbarch_char_signed (gdbarch, 0);
|
||||
set_gdbarch_char_signed (gdbarch, 1);
|
||||
|
||||
info.target_desc = tdesc;
|
||||
info.tdesc_data = tdesc_data.get ();
|
||||
|
||||
Reference in New Issue
Block a user