mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
* doublest.c (floatformat_from_length): Use the right element from
gdbarch floatformats. (floatformat_from_type, extract_typed_floating) (store_typed_floating): Likewise. * doublest.h: Remove declarations for undefined floatformat arrays. * gdbarch.sh (float_format, double_format, long_double_format): Change to pairs. (pformat): Update for pairs. * gdbarch.c, gdbarch.h: Regenerated. * gdbtypes.c (floatformats_ieee_single, floatformats_ieee_double) (floatformats_ieee_double_littlebyte_bigword) (floatformats_i387_ext, floatformats_m68881_ext, floatformats_arm_ext) (floatformats_ia64_spill, floatformats_ia64_quad, floatformats_vax_f) (floatformats_vax_d): New variables. (builtin_type_ieee_single, builtin_type_ieee_double) (builtin_type_arm_ext, builtin_type_ia64_spill) (builtin_type_ia64_quad): Replace arrays with individual types. (builtin_type_ieee_single_big, builtin_type_ieee_single_little) (builtin_type_ieee_double_big, builtin_type_ieee_double_little) (builtin_type_ieee_double_littlebyte_bigword, builtin_type_i960_ext) (builtin_type_m88110_ext, builtin_type_m88110_harris_ext) (builtin_type_arm_ext_big, builtin_type_arm_ext_littlebyte_bigword) (builtin_type_ia64_spill_big, builtin_type_ia64_spill_little) (builtin_type_ia64_quad_big, builtin_type_ia64_quad_little): Delete unused and endian-specific types. (recursive_dump_type): Update for floatformat pairs. (build_flt): Move higher. Handle bit == -1. Take a floatformat pair. (build_gdbtypes): Use build_flt. (_initialize_gdbtypes): Update set of initialized types. * gdbtypes.h: Update declarations to match gdbtypes.c. (struct main_type): Store a pointer to two floatformats. * arch-utils.c (default_float_format, default_double_format): Delete. * arch-utils.h (default_float_format, default_double_format): Delete. * arm-tdep.c, avr-tdep.c, hppa-tdep.c, hppabsd-tdep.c, i386-tdep.c, ia64-tdep.c, iq2000-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-linux-tdep.c, mips-tdep.c, mt-tdep.c, ppcobsd-tdep.c, sparc-linux-tdep.c, sparc-tdep.c, sparcnbsd-tdep.c, spu-tdep.c, vax-tdep.c, alpha-tdep.c, ppc-sysv-tdep.c: Update.
This commit is contained in:
@ -69,12 +69,13 @@ show_gdbarch_debug (struct ui_file *file, int from_tty,
|
||||
}
|
||||
|
||||
static const char *
|
||||
pformat (const struct floatformat *format)
|
||||
pformat (const struct floatformat **format)
|
||||
{
|
||||
if (format == NULL)
|
||||
return "(null)";
|
||||
else
|
||||
return format->name;
|
||||
/* Just print out one of them - this is only for diagnostics. */
|
||||
return format[0]->name;
|
||||
}
|
||||
|
||||
|
||||
@ -136,11 +137,11 @@ struct gdbarch
|
||||
int long_bit;
|
||||
int long_long_bit;
|
||||
int float_bit;
|
||||
const struct floatformat * float_format;
|
||||
const struct floatformat ** float_format;
|
||||
int double_bit;
|
||||
const struct floatformat * double_format;
|
||||
const struct floatformat ** double_format;
|
||||
int long_double_bit;
|
||||
const struct floatformat * long_double_format;
|
||||
const struct floatformat ** long_double_format;
|
||||
int ptr_bit;
|
||||
int addr_bit;
|
||||
int bfd_vma_bit;
|
||||
@ -516,13 +517,13 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
|
||||
/* Skip verify of long_long_bit, invalid_p == 0 */
|
||||
/* Skip verify of float_bit, invalid_p == 0 */
|
||||
if (current_gdbarch->float_format == 0)
|
||||
current_gdbarch->float_format = default_float_format (current_gdbarch);
|
||||
current_gdbarch->float_format = floatformats_ieee_single;
|
||||
/* Skip verify of double_bit, invalid_p == 0 */
|
||||
if (current_gdbarch->double_format == 0)
|
||||
current_gdbarch->double_format = default_double_format (current_gdbarch);
|
||||
current_gdbarch->double_format = floatformats_ieee_double;
|
||||
/* Skip verify of long_double_bit, invalid_p == 0 */
|
||||
if (current_gdbarch->long_double_format == 0)
|
||||
current_gdbarch->long_double_format = default_double_format (current_gdbarch);
|
||||
current_gdbarch->long_double_format = floatformats_ieee_double;
|
||||
/* Skip verify of ptr_bit, invalid_p == 0 */
|
||||
if (current_gdbarch->addr_bit == 0)
|
||||
current_gdbarch->addr_bit = TARGET_PTR_BIT;
|
||||
@ -1740,7 +1741,7 @@ set_gdbarch_float_bit (struct gdbarch *gdbarch,
|
||||
gdbarch->float_bit = float_bit;
|
||||
}
|
||||
|
||||
const struct floatformat *
|
||||
const struct floatformat **
|
||||
gdbarch_float_format (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
@ -1751,7 +1752,7 @@ gdbarch_float_format (struct gdbarch *gdbarch)
|
||||
|
||||
void
|
||||
set_gdbarch_float_format (struct gdbarch *gdbarch,
|
||||
const struct floatformat * float_format)
|
||||
const struct floatformat ** float_format)
|
||||
{
|
||||
gdbarch->float_format = float_format;
|
||||
}
|
||||
@ -1773,7 +1774,7 @@ set_gdbarch_double_bit (struct gdbarch *gdbarch,
|
||||
gdbarch->double_bit = double_bit;
|
||||
}
|
||||
|
||||
const struct floatformat *
|
||||
const struct floatformat **
|
||||
gdbarch_double_format (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
@ -1784,7 +1785,7 @@ gdbarch_double_format (struct gdbarch *gdbarch)
|
||||
|
||||
void
|
||||
set_gdbarch_double_format (struct gdbarch *gdbarch,
|
||||
const struct floatformat * double_format)
|
||||
const struct floatformat ** double_format)
|
||||
{
|
||||
gdbarch->double_format = double_format;
|
||||
}
|
||||
@ -1806,7 +1807,7 @@ set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
|
||||
gdbarch->long_double_bit = long_double_bit;
|
||||
}
|
||||
|
||||
const struct floatformat *
|
||||
const struct floatformat **
|
||||
gdbarch_long_double_format (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
@ -1817,7 +1818,7 @@ gdbarch_long_double_format (struct gdbarch *gdbarch)
|
||||
|
||||
void
|
||||
set_gdbarch_long_double_format (struct gdbarch *gdbarch,
|
||||
const struct floatformat * long_double_format)
|
||||
const struct floatformat ** long_double_format)
|
||||
{
|
||||
gdbarch->long_double_format = long_double_format;
|
||||
}
|
||||
|
Reference in New Issue
Block a user