aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2000-04-14 19:14:19 +0000
committerJim Blandy <jimb@codesourcery.com>2000-04-14 19:14:19 +0000
commit7355ddbacef086a00575d289049611428fbf8087 (patch)
tree1bb11c0265fb71578fcf8ccb59331ecb4937999d /gdb/gdbarch.c
parent16c088d03772776d9305b5e3f447f6600727c4b8 (diff)
downloadgdb-7355ddbacef086a00575d289049611428fbf8087.zip
gdb-7355ddbacef086a00575d289049611428fbf8087.tar.gz
gdb-7355ddbacef086a00575d289049611428fbf8087.tar.bz2
Bring IEEE_FLOAT under gdbarch's control.
* gdbarch.sh (IEEE_FLOAT): New entry. * gdbarch.c, gdbarch.h: Regenerated. * valprint.c (IEEE_FLOAT): Provide a default #definition for this. (print_floating): Use IEEE_FLOAT as if it were an expression; use the code specific to IEEE-format numbers whenever the value of IEEE_FLOAT is non-zero. * config/a29k/tm-a29k.h, config/alpha/tm-alpha.h, config/arc/tm-arc.h, config/arm/tm-arm.h, config/fr30/tm-fr30.h, config/h8300/tm-h8300.h, config/i386/tm-i386.h, config/i960/tm-i960.h, config/m88k/tm-m88k.h, config/mips/tm-mips.h, config/pa/tm-hppa.h, config/sparc/tm-sparc.h, config/delta/tm-delta.h, config/frv/tm-frv.h (IEEE_FLOAT): For all ports that #define IEEE_FLOAT, make sure they give it the value (1).
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index a1b02ac..6b58760 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -135,6 +135,7 @@ struct gdbarch
int float_bit;
int double_bit;
int long_double_bit;
+ int ieee_float;
gdbarch_read_pc_ftype *read_pc;
gdbarch_write_pc_ftype *write_pc;
gdbarch_read_fp_ftype *read_fp;
@@ -273,6 +274,7 @@ struct gdbarch startup_gdbarch = {
0,
0,
0,
+ 0,
generic_get_saved_register,
0,
0,
@@ -335,6 +337,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
/* Force the explicit initialization of these. */
gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
+ gdbarch->ieee_float = 1;
gdbarch->num_regs = -1;
gdbarch->sp_regnum = -1;
gdbarch->fp_regnum = -1;
@@ -423,6 +426,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->long_double_bit == 0))
internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
+ /* Skip verify of ieee_float, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->read_pc == 0))
internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
@@ -656,6 +660,9 @@ gdbarch_dump (void)
"gdbarch_update: TARGET_LONG_DOUBLE_BIT = %ld\n",
(long) TARGET_LONG_DOUBLE_BIT);
fprintf_unfiltered (gdb_stdlog,
+ "gdbarch_update: IEEE_FLOAT = %ld\n",
+ (long) IEEE_FLOAT);
+ fprintf_unfiltered (gdb_stdlog,
"gdbarch_update: TARGET_READ_PC = 0x%08lx\n",
(long) current_gdbarch->read_pc
/*TARGET_READ_PC ()*/);
@@ -1120,6 +1127,22 @@ set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
gdbarch->long_double_bit = long_double_bit;
}
+int
+gdbarch_ieee_float (struct gdbarch *gdbarch)
+{
+ /* Skip verify of ieee_float, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
+ return gdbarch->ieee_float;
+}
+
+void
+set_gdbarch_ieee_float (struct gdbarch *gdbarch,
+ int ieee_float)
+{
+ gdbarch->ieee_float = ieee_float;
+}
+
CORE_ADDR
gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
{