aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-31 17:00:07 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-31 17:00:07 +0000
commit0d20ae728092963c013036d93d9f0d55c04226c9 (patch)
tree91b1e3360c4e6bae8f5e8f9da961f9ad8dbccfb6 /gdb/doublest.c
parentfaaf634c109b5b97c2a51a9a0ef5ecdc596b270a (diff)
downloadgdb-0d20ae728092963c013036d93d9f0d55c04226c9.zip
gdb-0d20ae728092963c013036d93d9f0d55c04226c9.tar.gz
gdb-0d20ae728092963c013036d93d9f0d55c04226c9.tar.bz2
2007-05-31 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (TARGET_BYTE_ORDER): Replace by gdbarch_byte_order. * ax-gdb.c (gen_bitfield_ref): Likewise. * mi/mi-main.c (get_register): Likewise. * findvar.c (default_value_from_register, extract_signed_integer) (extract_unsigned_integer, extract_long_unsigned_integer) (store_signed_integer, store_unsigned_integer): Likewise. * regcache.c (regcache_dump): Likewise. * value.c (lookup_internalvar, value_of_internalvar) (set_internalvar): Likewise. * defs.h: Likewise. * valprint.c (print_binary_chars, print_octal_chars) (print_decimal_chars, print_hex_chars, print_char_chars): Likewise. * infcmd.c (default_print_registers_info): Likewise. * arch-utils.c (selected_byte_order, show_endian): Likewise. * stabsread.c (define_symbol): Likewise. * doublest.c (floatformat_from_length, floatformat_from_type) (extract_typed_floating, store_typed_floating): Likewise. * gdbarch.c, gdbarch.h: Regenerate.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r--gdb/doublest.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 77e7ef9..6107c72 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -725,11 +725,11 @@ floatformat_from_length (int len)
{
const struct floatformat *format;
if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
- format = TARGET_FLOAT_FORMAT[TARGET_BYTE_ORDER];
+ format = TARGET_FLOAT_FORMAT[gdbarch_byte_order (current_gdbarch)];
else if (len * TARGET_CHAR_BIT == TARGET_DOUBLE_BIT)
- format = TARGET_DOUBLE_FORMAT[TARGET_BYTE_ORDER];
+ format = TARGET_DOUBLE_FORMAT[gdbarch_byte_order (current_gdbarch)];
else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT)
- format = TARGET_LONG_DOUBLE_FORMAT[TARGET_BYTE_ORDER];
+ format = TARGET_LONG_DOUBLE_FORMAT[gdbarch_byte_order (current_gdbarch)];
/* On i386 the 'long double' type takes 96 bits,
while the real number of used bits is only 80,
both in processor and in memory.
@@ -737,7 +737,7 @@ floatformat_from_length (int len)
else if ((TARGET_LONG_DOUBLE_FORMAT != NULL)
&& (len * TARGET_CHAR_BIT ==
TARGET_LONG_DOUBLE_FORMAT[0]->totalsize))
- format = TARGET_LONG_DOUBLE_FORMAT[TARGET_BYTE_ORDER];
+ format = TARGET_LONG_DOUBLE_FORMAT[gdbarch_byte_order (current_gdbarch)];
else
format = NULL;
if (format == NULL)
@@ -751,7 +751,7 @@ floatformat_from_type (const struct type *type)
{
gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
if (TYPE_FLOATFORMAT (type) != NULL)
- return TYPE_FLOATFORMAT (type)[TARGET_BYTE_ORDER];
+ return TYPE_FLOATFORMAT (type)[gdbarch_byte_order (current_gdbarch)];
else
return floatformat_from_length (TYPE_LENGTH (type));
}
@@ -812,7 +812,8 @@ extract_typed_floating (const void *addr, const struct type *type)
specific code? stabs?) so handle that here as a special case. */
return extract_floating_by_length (addr, TYPE_LENGTH (type));
- floatformat_to_doublest (TYPE_FLOATFORMAT (type)[TARGET_BYTE_ORDER],
+ floatformat_to_doublest
+ (TYPE_FLOATFORMAT (type)[gdbarch_byte_order (current_gdbarch)],
addr, &retval);
return retval;
}
@@ -850,8 +851,9 @@ store_typed_floating (void *addr, const struct type *type, DOUBLEST val)
specific code? stabs?) so handle that here as a special case. */
store_floating_by_length (addr, TYPE_LENGTH (type), val);
else
- floatformat_from_doublest (TYPE_FLOATFORMAT (type)[TARGET_BYTE_ORDER],
- &val, addr);
+ floatformat_from_doublest
+ (TYPE_FLOATFORMAT (type)[gdbarch_byte_order (current_gdbarch)],
+ &val, addr);
}
/* Convert a floating-point number of type FROM_TYPE from a