summaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-01-29 03:08:28 +0000
committerAndrew Cagney <cagney@redhat.com>2002-01-29 03:08:28 +0000
commit21df7b29752a4983ff2f0e55d170e1703ffe50a9 (patch)
tree70724d035081a5fbac1d66d33a144d75bc8cdcef /gdb/values.c
parent97844dd1464c95dde7ae13a838e331f5c0d1f2c9 (diff)
downloadgdb-21df7b29752a4983ff2f0e55d170e1703ffe50a9.tar.gz
* config/vax/tm-vax.h (INVALID_FLOAT): Move macro from here...
* vax-tdep.c (INVALID_FLOAT): To here. Document why it is broken. * rs6000-tdep.c (rs6000_do_registers_info): Delete code wrapped in #ifdef INVALID_FLOAT. * infcmd.c (do_registers_info): Ditto. * values.c (unpack_double): Ditto. Add comment. * config/ns32k/tm-umax.h (INVALID_FLOAT): Delete macro that was already commented out.
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 68230e621ed..9445d9c4561 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -742,13 +742,22 @@ unpack_double (struct type *type, char *valaddr, int *invp)
nosign = TYPE_UNSIGNED (type);
if (code == TYPE_CODE_FLT)
{
-#ifdef INVALID_FLOAT
- if (INVALID_FLOAT (valaddr, len))
- {
- *invp = 1;
- return 1.234567891011121314;
- }
-#endif
+ /* NOTE: cagney/2002-02-19: There was a test here to see if the
+ floating-point value was valid (using the macro
+ INVALID_FLOAT). That test/macro have been removed.
+
+ It turns out that only the VAX defined this macro and then
+ only in a non-portable way. Fixing the portability problem
+ wouldn't help since the VAX floating-point code is also badly
+ bit-rotten. The target needs to add definitions for the
+ methods TARGET_FLOAT_FORMAT and TARGET_DOUBLE_FORMAT - these
+ exactly describe the target floating-point format. The
+ problem here is that the corresponding floatformat_vax_f and
+ floatformat_vax_d values these methods should be set to are
+ also not defined either. Oops!
+
+ Hopefully someone will add both the missing floatformat
+ definitions and floatformat_is_invalid() function. */
return extract_typed_floating (valaddr, type);
}
else if (nosign)