summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.sh
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-01-29 17:31:06 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-01-29 17:31:06 +0000
commite1a05d1fb21784a4e18e349d7eeae8b38bb4e1f7 (patch)
treeb044afc1990d516943902fb66dabf44b651618fa /gdb/gdbarch.sh
parenta4a6ce7efffc04ada2c47fb8db51089d13dac5e1 (diff)
downloadgdb-e1a05d1fb21784a4e18e349d7eeae8b38bb4e1f7.tar.gz
* 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.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-xgdb/gdbarch.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index db88df0f9a4..d0547991bc4 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -391,13 +391,15 @@ v:TARGET_LONG_LONG_BIT:int:long_long_bit:::8 * sizeof (LONGEST):2*TARGET_LONG_BI
# The ABI default bit-size and format for "float", "double", and "long
# double". These bit/format pairs should eventually be combined into
# a single object. For the moment, just initialize them as a pair.
+# Each format describes both the big and little endian layouts (if
+# useful).
v:TARGET_FLOAT_BIT:int:float_bit:::8 * sizeof (float):4*TARGET_CHAR_BIT::0
-v:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format:::::default_float_format (current_gdbarch)::pformat (current_gdbarch->float_format)
+v:TARGET_FLOAT_FORMAT:const struct floatformat **:float_format:::::floatformats_ieee_single::pformat (current_gdbarch->float_format)
v:TARGET_DOUBLE_BIT:int:double_bit:::8 * sizeof (double):8*TARGET_CHAR_BIT::0
-v:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format:::::default_double_format (current_gdbarch)::pformat (current_gdbarch->double_format)
+v:TARGET_DOUBLE_FORMAT:const struct floatformat **:double_format:::::floatformats_ieee_double::pformat (current_gdbarch->double_format)
v:TARGET_LONG_DOUBLE_BIT:int:long_double_bit:::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
-v:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format:::::default_double_format (current_gdbarch)::pformat (current_gdbarch->long_double_format)
+v:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat **:long_double_format:::::floatformats_ieee_double::pformat (current_gdbarch->long_double_format)
# For most targets, a pointer on the target and its representation as an
# address in GDB have the same size and "look the same". For such a
@@ -1204,12 +1206,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;
}
EOF