aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog35
-rw-r--r--gdb/alpha-tdep.c3
-rw-r--r--gdb/arm-tdep.c1
-rw-r--r--gdb/avr-tdep.c1
-rw-r--r--gdb/config/pa/tm-hppa.h10
-rw-r--r--gdb/config/sparc/tm-sparc.h14
-rw-r--r--gdb/cris-tdep.c1
-rw-r--r--gdb/d10v-tdep.c1
-rw-r--r--gdb/frv-tdep.c1
-rw-r--r--gdb/gdbarch.c66
-rw-r--r--gdb/gdbarch.h40
-rwxr-xr-xgdb/gdbarch.sh2
-rw-r--r--gdb/h8300-tdep.c1
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/i386-tdep.c1
-rw-r--r--gdb/ia64-tdep.c1
-rw-r--r--gdb/m68hc11-tdep.c1
-rw-r--r--gdb/m68k-tdep.c2
-rw-r--r--gdb/mcore-tdep.c1
-rw-r--r--gdb/mips-tdep.c1
-rw-r--r--gdb/mn10300-tdep.c1
-rw-r--r--gdb/ns32k-tdep.c2
-rw-r--r--gdb/rs6000-tdep.c1
-rw-r--r--gdb/s390-tdep.c1
-rw-r--r--gdb/sh-tdep.c1
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/v850-tdep.c1
-rw-r--r--gdb/valops.c32
-rw-r--r--gdb/vax-tdep.c4
-rw-r--r--gdb/xstormy16-tdep.c1
30 files changed, 156 insertions, 75 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 53b7c94..e1cdf81 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,38 @@
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_PUSH_DUMMY_FRAME): Procedure with
+ predicate. Replaces PUSH_DUMMY_FRAME.
+ * gdbarch.h, gdbarch.c: Regnerate.
+ * valops.c (hand_function_call): Update. Call
+ generic_push_dummy_frame directly.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * hppa-tdep.c (hppa_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * config/sparc/tm-sparc.h (DEPRECATED_PUSH_DUMMY_FRAME): Update.
+ * config/pa/tm-hppa.h (DEPRECATED_PUSH_DUMMY_FRAME): Update.
+ * inferior.h (PUSH_DUMMY_FRAME): Delete definition.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Don't set
+ push_dummy_frame to generic_push_dummy_frame.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+
2003-02-26 Kevin Buettner <kevinb@redhat.com>
* mips-tdep.c (show_mips_abi): New function.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 208c7f2..e476ef3 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -72,7 +72,6 @@ static gdbarch_frame_saved_pc_ftype alpha_frame_saved_pc;
static gdbarch_frame_init_saved_regs_ftype alpha_frame_init_saved_regs;
static gdbarch_push_arguments_ftype alpha_push_arguments;
-static gdbarch_push_dummy_frame_ftype alpha_push_dummy_frame;
static gdbarch_pop_frame_ftype alpha_pop_frame;
static gdbarch_fix_call_dummy_ftype alpha_fix_call_dummy;
static gdbarch_init_extra_frame_info_ftype alpha_init_extra_frame_info;
@@ -1883,7 +1882,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
+ set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
set_gdbarch_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
set_gdbarch_deprecated_init_frame_pc_first (gdbarch, alpha_init_frame_pc_first);
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index cb7d50d..7d7f884 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2915,7 +2915,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_num_args (gdbarch, arm_frame_num_args);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frame_init_saved_regs (gdbarch, arm_frame_init_saved_regs);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_pop_frame (gdbarch, arm_pop_frame);
/* Address manipulation. */
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 0ee223e..3d8711f 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1181,7 +1181,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
set_gdbarch_push_arguments (gdbarch, avr_push_arguments);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, avr_push_return_address);
set_gdbarch_pop_frame (gdbarch, avr_pop_frame);
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 1b9e770..bffe8aa 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -453,11 +453,11 @@ extern void hppa_frame_find_saved_regs (struct frame_info *,
/* Push an empty stack frame, to record the current PC, etc. */
/* FIXME: brobecker 2002-12-26. This macro definition takes advantage
- of the fact that PUSH_DUMMY_FRAME is called within a function where
- a variable inf_status of type struct inferior_status * is defined.
- Ugh! Until this is fixed, we will not be able to move to multiarch
- partial. */
-#define PUSH_DUMMY_FRAME hppa_push_dummy_frame (inf_status)
+ of the fact that DEPRECATED_PUSH_DUMMY_FRAME is called within a
+ function where a variable inf_status of type struct inferior_status
+ * is defined. Ugh! Until this is fixed, we will not be able to
+ move to multiarch partial. */
+#define DEPRECATED_PUSH_DUMMY_FRAME hppa_push_dummy_frame (inf_status)
extern void hppa_push_dummy_frame (struct inferior_status *);
/* Discard from the stack the innermost frame,
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index a323387..e683103 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -582,18 +582,18 @@ extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
* I understand everything in this picture except what the space
* between fp - 0xe0 and fp - 0x140 is used for. Oh, and I don't
* understand why there's a large chunk of CALL_DUMMY that never gets
- * executed (its function is superceeded by PUSH_DUMMY_FRAME; they
- * are designed to do the same thing).
+ * executed (its function is superceeded by
+ * DEPRECATED_PUSH_DUMMY_FRAME; they are designed to do the same
+ * thing).
*
- * PUSH_DUMMY_FRAME saves the registers above sp' and pushes the
- * register file stack down one.
+ * DEPRECATED_PUSH_DUMMY_FRAME saves the registers above sp' and
+ * pushes the * register file stack down one.
*
* call_function then writes CALL_DUMMY, pushes the args onto the
* stack, and adjusts the stack pointer.
*
* run_stack_dummy then starts execution (in the middle of
- * CALL_DUMMY, as directed by call_function).
- */
+ * CALL_DUMMY, as directed by call_function). */
#ifndef CALL_DUMMY
/* This sequence of words is the instructions
@@ -681,7 +681,7 @@ void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
/* Push an empty stack frame, to record the current PC, etc. */
-#define PUSH_DUMMY_FRAME sparc_push_dummy_frame ()
+#define DEPRECATED_PUSH_DUMMY_FRAME sparc_push_dummy_frame ()
#define POP_FRAME sparc_pop_frame ()
void sparc_push_dummy_frame (void);
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 5911318..c1af9ac 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4283,7 +4283,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* No register requires conversion from raw format to virtual format. */
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, cris_push_return_address);
set_gdbarch_pop_frame (gdbarch, cris_pop_frame);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index c6b94bd..e2a0c80 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1697,7 +1697,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, d10v_push_return_address);
set_gdbarch_store_struct_return (gdbarch, d10v_store_struct_return);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index b89e54e..931600f 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1119,7 +1119,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 10f6397..c8e296c 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -213,7 +213,7 @@ struct gdbarch
gdbarch_integer_to_address_ftype *integer_to_address;
gdbarch_return_value_on_stack_ftype *return_value_on_stack;
gdbarch_push_arguments_ftype *push_arguments;
- gdbarch_push_dummy_frame_ftype *push_dummy_frame;
+ gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
gdbarch_push_return_address_ftype *push_return_address;
gdbarch_pop_frame_ftype *pop_frame;
gdbarch_store_struct_return_ftype *store_struct_return;
@@ -724,9 +724,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of integer_to_address, has predicate */
/* Skip verify of return_value_on_stack, invalid_p == 0 */
/* Skip verify of push_arguments, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->push_dummy_frame == 0))
- fprintf_unfiltered (log, "\n\tpush_dummy_frame");
+ /* Skip verify of deprecated_push_dummy_frame, has predicate */
/* Skip verify of push_return_address, has predicate */
/* Skip verify of pop_frame, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
@@ -1231,6 +1229,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_pc_in_call_dummy
/*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
#endif
+#ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PUSH_DUMMY_FRAME_P()",
+ XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
+ DEPRECATED_PUSH_DUMMY_FRAME_P ());
+#endif
+#ifdef DEPRECATED_PUSH_DUMMY_FRAME
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PUSH_DUMMY_FRAME(-)",
+ XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_push_dummy_frame
+ /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
+#endif
#ifdef DEPRECATED_STORE_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1857,20 +1878,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->push_arguments
/*PUSH_ARGUMENTS ()*/);
#endif
-#ifdef PUSH_DUMMY_FRAME
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PUSH_DUMMY_FRAME(-)",
- XSTRING (PUSH_DUMMY_FRAME (-)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: PUSH_DUMMY_FRAME = <0x%08lx>\n",
- (long) current_gdbarch->push_dummy_frame
- /*PUSH_DUMMY_FRAME ()*/);
-#endif
#ifdef PUSH_RETURN_ADDRESS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -4154,23 +4161,30 @@ set_gdbarch_push_arguments (struct gdbarch *gdbarch,
gdbarch->push_arguments = push_arguments;
}
+int
+gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_push_dummy_frame != 0;
+}
+
void
-gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
+gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->push_dummy_frame == 0)
+ if (gdbarch->deprecated_push_dummy_frame == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_push_dummy_frame invalid");
+ "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
- gdbarch->push_dummy_frame ();
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
+ gdbarch->deprecated_push_dummy_frame ();
}
void
-set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
- gdbarch_push_dummy_frame_ftype push_dummy_frame)
+set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
+ gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
{
- gdbarch->push_dummy_frame = push_dummy_frame;
+ gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
}
int
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 0680916..606511b 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1526,15 +1526,41 @@ extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_ar
#endif
#endif
-typedef void (gdbarch_push_dummy_frame_ftype) (void);
-extern void gdbarch_push_dummy_frame (struct gdbarch *gdbarch);
-extern void set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_push_dummy_frame_ftype *push_dummy_frame);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_DUMMY_FRAME)
-#error "Non multi-arch definition of PUSH_DUMMY_FRAME"
+#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
+/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
+#if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
+#endif
+
+extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
+#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
+#endif
+
+typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
+extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_DUMMY_FRAME)
-#define PUSH_DUMMY_FRAME (gdbarch_push_dummy_frame (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
#endif
#endif
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 2408299..fe3ba39 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -536,7 +536,7 @@ F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf
#
f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr:::default_push_arguments::0
-f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0
+F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
F:2:POP_FRAME:void:pop_frame:void:-:::0
#
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 8119a2d..5c04805 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1148,7 +1148,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Call Dummies
*
* These values and methods are used when gdb calls a target function. */
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, h8300_push_return_address);
set_gdbarch_deprecated_extract_return_value (gdbarch, h8300_extract_return_value);
set_gdbarch_push_arguments (gdbarch, h8300_push_arguments);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 03ad5e8..6390674 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -5016,7 +5016,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_locals_address (gdbarch, hppa_frame_locals_address);
set_gdbarch_frame_num_args (gdbarch, hppa_frame_num_args);
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* set_gdbarch_push_dummy_frame (gdbarch, hppa_push_dummy_frame); */
+ /* set_gdbarch_deprecated_push_dummy_frame (gdbarch, hppa_push_dummy_frame); */
set_gdbarch_pop_frame (gdbarch, hppa_pop_frame);
set_gdbarch_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index e2729f9..c660f9a 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1590,7 +1590,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index b37da52..e8d0e73 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -2252,7 +2252,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 05ef436..ddc988f 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1385,7 +1385,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address);
set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 182cac6..7a262a2 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1050,7 +1050,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_words));
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, m68k_fix_call_dummy);
- set_gdbarch_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
+ set_gdbarch_deprecated_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
set_gdbarch_pop_frame (gdbarch, m68k_pop_frame);
return gdbarch;
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 134f9dd..fcb390e 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1131,7 +1131,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_breakpoint_from_pc (gdbarch, mcore_breakpoint_from_pc);
set_gdbarch_push_return_address (gdbarch, mcore_push_return_address);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_arguments (gdbarch, mcore_push_arguments);
set_gdbarch_call_dummy_length (gdbarch, 0);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 8d5f97b..d2f994c 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5991,7 +5991,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_pop_frame (gdbarch, mips_pop_frame);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index a3dd012..1ee8e57 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1197,7 +1197,6 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_arguments (gdbarch, mn10300_push_arguments);
set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr);
set_gdbarch_push_return_address (gdbarch, mn10300_push_return_address);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index fe5ebdf..d58b813 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -592,7 +592,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
ns32k_extract_struct_value_address);
/* Call dummy info */
- set_gdbarch_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
+ set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
set_gdbarch_pop_frame (gdbarch, ns32k_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_call_dummy_p (gdbarch, 1);
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a8ed3d0..591255e 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2895,7 +2895,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_push_return_address (gdbarch, ppc_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 21efca8..bd04bfc 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1866,7 +1866,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_arguments (gdbarch, s390_push_arguments);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 46b7dee..90221db 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -4664,7 +4664,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, sh_push_return_address);
set_gdbarch_deprecated_store_return_value (gdbarch, sh_store_return_value);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 16e68a1..b7ee154 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -3160,7 +3160,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_max_register_virtual_size (gdbarch, 8);
set_gdbarch_pop_frame (gdbarch, sparc_pop_frame);
set_gdbarch_push_return_address (gdbarch, sparc_push_return_address);
- set_gdbarch_push_dummy_frame (gdbarch, sparc_push_dummy_frame);
+ set_gdbarch_deprecated_push_dummy_frame (gdbarch, sparc_push_dummy_frame);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_register_convert_to_raw (gdbarch, sparc_convert_to_raw);
set_gdbarch_register_convert_to_virtual (gdbarch,
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 3970145..8375439 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1268,7 +1268,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Call Dummies
*
* These values and methods are used when gdb calls a target function. */
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, v850_push_return_address);
set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value);
set_gdbarch_push_arguments (gdbarch, v850_push_arguments);
diff --git a/gdb/valops.c b/gdb/valops.c
index bd340e8..6dcc6f1 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1300,10 +1300,34 @@ hand_function_call (struct value *function, int nargs, struct value **args)
inf_status = save_inferior_status (1);
inf_status_cleanup = make_cleanup_restore_inferior_status (inf_status);
- /* PUSH_DUMMY_FRAME is responsible for saving the inferior registers
- (and POP_FRAME for restoring them). (At least on most machines)
- they are saved on the stack in the inferior. */
- PUSH_DUMMY_FRAME;
+ if (DEPRECATED_PUSH_DUMMY_FRAME_P ())
+ {
+ /* DEPRECATED_PUSH_DUMMY_FRAME is responsible for saving the
+ inferior registers (and POP_FRAME for restoring them). (At
+ least on most machines) they are saved on the stack in the
+ inferior. */
+ DEPRECATED_PUSH_DUMMY_FRAME;
+ }
+ else
+ {
+ /* FIXME: cagney/2003-02-26: Step zero of this little tinker is
+ to extract the generic dummy frame code from the architecture
+ vector. Hence this direct call.
+
+ A follow-on change is to modify this interface so that it takes
+ thread OR frame OR tpid as a parameter, and returns a dummy
+ frame handle. The handle can then be used further down as a
+ parameter SAVE_DUMMY_FRAME_TOS. Hmm, thinking about it, since
+ everything is ment to be using generic dummy frames, why not
+ even use some of the dummy frame code to here - do a regcache
+ dup and then pass the duped regcache, along with all the other
+ stuff, at one single point.
+
+ In fact, you can even save the structure's return address in the
+ dummy frame and fix one of those nasty lost struct return edge
+ conditions. */
+ generic_push_dummy_frame ();
+ }
old_sp = read_sp ();
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 52438d5..a88c570 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -53,7 +53,7 @@ static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype
vax_extract_struct_value_address;
-static gdbarch_push_dummy_frame_ftype vax_push_dummy_frame;
+static gdbarch_deprecated_push_dummy_frame_ftype vax_push_dummy_frame;
static gdbarch_pop_frame_ftype vax_pop_frame;
static gdbarch_fix_call_dummy_ftype vax_fix_call_dummy;
@@ -669,7 +669,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address);
/* Call dummy info */
- set_gdbarch_push_dummy_frame (gdbarch, vax_push_dummy_frame);
+ set_gdbarch_deprecated_push_dummy_frame (gdbarch, vax_push_dummy_frame);
set_gdbarch_pop_frame (gdbarch, vax_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_call_dummy_p (gdbarch, 1);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 3ecfd3c..bccc849 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1086,7 +1086,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Call Dummies
*
* These values and methods are used when gdb calls a target function. */
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, xstormy16_push_return_address);
set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value);
set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments);