aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2000-02-22 19:18:53 +0000
committerJim Blandy <jimb@codesourcery.com>2000-02-22 19:18:53 +0000
commitb9a8e3bfd40ae4b14d2ff3a6d7f8704f5782eba8 (patch)
tree1ba9faebd0ce345f35eba3024e8e794a99f757ba /gdb/gdbarch.h
parent87f398dd6a71a1d10f378be4ad51da680034260f (diff)
downloadgdb-b9a8e3bfd40ae4b14d2ff3a6d7f8704f5782eba8.zip
gdb-b9a8e3bfd40ae4b14d2ff3a6d7f8704f5782eba8.tar.gz
gdb-b9a8e3bfd40ae4b14d2ff3a6d7f8704f5782eba8.tar.bz2
Bring COERCE_FLOAT_TO_DOUBLE under gdbarch's control.
* valops.c (COERCE_FLOAT_TO_DOUBLE): Rework definition to be more function-like. (default_coerce_float_to_double, standard_coerce_float_to_double): New functions. (value_arg_coerce): Adjust for new definition. * value.h (default_coerce_float_to_double, standard_coerce_float_to_double): New declarations for the above. * gdbarch.sh (coerce_float_to_double): New entry, replacing macro. * gdbarch.c, gdbarch.h: Regenerated. * tm-alpha.h, tm-fr30.h, tm-m32r.h, tm-mips.h, tm-hppa.h, tm-rs6000.h, tm-sh.h, tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Change definitions. * mips-tdep.c (mips_coerce_float_to_double): Supply our own custom function here. (mips_gdbarch_init): Install that as our coerce_float_to_double function.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index a1f7c76..1244f93 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -465,6 +465,15 @@ extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int
#endif
#endif
+typedef int (gdbarch_coerce_float_to_double_ftype) (struct type *formal, struct type *actual);
+extern int gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual);
+extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch_coerce_float_to_double_ftype *coerce_float_to_double);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > 1) || !defined (COERCE_FLOAT_TO_DOUBLE)
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual))
+#endif
+#endif
+
typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
extern void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);