aboutsummaryrefslogtreecommitdiff
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
commit75bc7ddf1b1e98d946b1b3c260c56d2d8ebd251e (patch)
tree103d7e29427306062e958d2497b01371f519fbb4 /gdb/values.c
parent806dedcd0cd16f62daee0c726cd3be4606ad5359 (diff)
downloadgdb-75bc7ddf1b1e98d946b1b3c260c56d2d8ebd251e.zip
gdb-75bc7ddf1b1e98d946b1b3c260c56d2d8ebd251e.tar.gz
gdb-75bc7ddf1b1e98d946b1b3c260c56d2d8ebd251e.tar.bz2
* 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 68230e6..9445d9c 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)