aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 28a8ce0..0ba9392 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -288,102 +288,6 @@ store_typed_address (void *buf, struct type *type, CORE_ADDR addr)
-
-/* Extract a floating-point number from a target-order byte-stream at ADDR.
- Returns the value as type DOUBLEST.
-
- If the host and target formats agree, we just copy the raw data into the
- appropriate type of variable and return, letting the host increase precision
- as necessary. Otherwise, we call the conversion routine and let it do the
- dirty work. */
-
-DOUBLEST
-extract_floating (void *addr, int len)
-{
- DOUBLEST dretval;
-
- if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
- {
- if (HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT)
- {
- float retval;
-
- memcpy (&retval, addr, sizeof (retval));
- return retval;
- }
- else
- floatformat_to_doublest (TARGET_FLOAT_FORMAT, addr, &dretval);
- }
- else if (len * TARGET_CHAR_BIT == TARGET_DOUBLE_BIT)
- {
- if (HOST_DOUBLE_FORMAT == TARGET_DOUBLE_FORMAT)
- {
- double retval;
-
- memcpy (&retval, addr, sizeof (retval));
- return retval;
- }
- else
- floatformat_to_doublest (TARGET_DOUBLE_FORMAT, addr, &dretval);
- }
- else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT)
- {
- if (HOST_LONG_DOUBLE_FORMAT == TARGET_LONG_DOUBLE_FORMAT)
- {
- DOUBLEST retval;
-
- memcpy (&retval, addr, sizeof (retval));
- return retval;
- }
- else
- floatformat_to_doublest (TARGET_LONG_DOUBLE_FORMAT, addr, &dretval);
- }
- else
- {
- error ("Can't deal with a floating point number of %d bytes.", len);
- }
-
- return dretval;
-}
-
-void
-store_floating (void *addr, int len, DOUBLEST val)
-{
- if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
- {
- if (HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT)
- {
- float floatval = val;
-
- memcpy (addr, &floatval, sizeof (floatval));
- }
- else
- floatformat_from_doublest (TARGET_FLOAT_FORMAT, &val, addr);
- }
- else if (len * TARGET_CHAR_BIT == TARGET_DOUBLE_BIT)
- {
- if (HOST_DOUBLE_FORMAT == TARGET_DOUBLE_FORMAT)
- {
- double doubleval = val;
-
- memcpy (addr, &doubleval, sizeof (doubleval));
- }
- else
- floatformat_from_doublest (TARGET_DOUBLE_FORMAT, &val, addr);
- }
- else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT)
- {
- if (HOST_LONG_DOUBLE_FORMAT == TARGET_LONG_DOUBLE_FORMAT)
- memcpy (addr, &val, sizeof (val));
- else
- floatformat_from_doublest (TARGET_LONG_DOUBLE_FORMAT, &val, addr);
- }
- else
- {
- error ("Can't deal with a floating point number of %d bytes.", len);
- }
-}
-
/* Return a `value' with the contents of register REGNUM
in its virtual format, with the type specified by
REGISTER_VIRTUAL_TYPE.