2003-02-27 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 27 Feb 2003 17:48:48 +0000 (17:48 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 27 Feb 2003 17:48:48 +0000 (17:48 +0000)
* 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.

30 files changed:
gdb/ChangeLog
gdb/alpha-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/config/pa/tm-hppa.h
gdb/config/sparc/tm-sparc.h
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/mcore-tdep.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/ns32k-tdep.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sparc-tdep.c
gdb/v850-tdep.c
gdb/valops.c
gdb/vax-tdep.c
gdb/xstormy16-tdep.c

index 53b7c946e46a99610538380a14df6517b3d927a4..e1cdf81632767fcb930e952d9a2561472c1444f3 100644 (file)
@@ -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.
index 208c7f2fb69fa771c2fd305f1c00d333d7db33c6..e476ef3332a135ac2c72c57b503c2b03cb997bff 100644 (file)
@@ -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);
index cb7d50d1fc47a355b8e1f03f02598ed085cda42b..7d7f8843db4964e50cf42d06034b689e2cadcb56 100644 (file)
@@ -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.  */
index 0ee223ef239b9a4ec32d722d2fb295056994d5e9..3d8711f494e9c709dd9596b94014248759443a1d 100644 (file)
@@ -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);
 
index 1b9e770f4462b1fd5025c1fe59a4a5108b61c9a3..bffe8aa26f3cb8c0d94ae399dca25f1a94cf2f7d 100644 (file)
@@ -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, 
index a32338740156d56879df9ea03099660efc832087..e683103da257b441bfc037a9367b291cdf1a4ae3 100644 (file)
@@ -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);
index 5911318266875aebd91d8755048a66548f43cd58..c1af9ac114b386b29c1d79ed0cc369b9e104e518 100644 (file)
@@ -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);
 
index c6b94bd21bd48b606ea56d678a03f75aced082f3..e2a0c80743fd8aecdabf6629cd0d8a79eba30380 100644 (file)
@@ -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);
index b89e54e58ef094596931f5c5351e9efda8da513f..931600f1cbe3a9a65eb3fca6b81576fac7ca06b4 100644 (file)
@@ -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);
index 10f63970fb8fd679e3c7d4aee69c90d68591b1fd..c8e296ca6e4ce0161b1bb17c92d086d56eb94d3c 100644 (file)
@@ -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
index 06809165999f0ed824892bfbd2bdc090a11b0892..606511bc86323cb1175df7f2235b55236993e733 100644 (file)
@@ -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
 
index 240829978546ce643336eb6f13ff1717243d58b1..fe3ba39a967c02fb6982b9759e4b6c2267023f11 100755 (executable)
@@ -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
 #
index 8119a2de5c5c1a675b681b58ad447006f16a7d4b..5c04805138c644412bc425e2fe36500cebd9dcc2 100644 (file)
@@ -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);
index 03ad5e80c89ebfeed6e75bc4b9cf9ebd34e46388..6390674909eeb14907adc01c26d874fda82bfbd8 100644 (file)
@@ -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);
index e2729f94965435595f556af825bf19bef3c0bf1b..c660f9ad1279d3d94befff0ea1ea0e9118870282 100644 (file)
@@ -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);
index b37da525580ffcbdccff9b0bed10a1c606e9fdd7..e8d0e730519a1c51c6c1868eed2943bcff4ad2e4 100644 (file)
@@ -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);
index 05ef436bb1d21c26af7b22afe7439b76f1a80ee9..ddc988fbe39e2c3de674b6a7f57451709643f807 100644 (file)
@@ -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);
 
index 182cac698d2a3e582a961bd2e76df2a0608da623..7a262a2f7768b8319bfcfb0bf253a06ec5e368cb 100644 (file)
@@ -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;
index 134f9ddbdb2abba468282602f833d8a0d5f76ec2..fcb390ec5fde7da0dc78a001c43d56679a0fde6c 100644 (file)
@@ -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);
 
index 8d5f97ba1df71fd2deeab4e89c589264f9482945..d2f994c2417b3327d03285dad51b2bd0491ff0d2 100644 (file)
@@ -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);
index a3dd0129c9b0a36d8e9ecb6c8044e18dd80c23a9..1ee8e573a7fae22b8911f34b446f819251a07fc6 100644 (file)
@@ -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);
index fe5ebdf0732ce77507df15024c0bae1bc55b7014..d58b813e3b264d9cd31c66ec6e224d65f97e0564 100644 (file)
@@ -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);
index a8ed3d0642c0acf466a42e78acef60d556cac21d..591255ee402a42c96f52e0ba9e60a564aff94fcd 100644 (file)
@@ -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);
index 21efca8fb77b21dd91858e13b3fa4265614016d3..bd04bfcc36dcbe7c6099d814f352c23845461797 100644 (file)
@@ -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);
index 46b7deec1fcde169f8486cce70807106e9c4b0a6..90221db30669a0fff48a4969610666201392ede8 100644 (file)
@@ -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);
index 16e68a12f2432117a153e058dda192346f5cc0d9..b7ee1548f1ab21bfaeacf75a97654d17d61017ba 100644 (file)
@@ -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, 
index 39701458ed4215774e7e78211568e4dc15821aac..8375439129ae7b8bbb4b2763943947c7567374ba 100644 (file)
@@ -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);
index bd340e88fe806f03d4e8f45e9bb13d209289932e..6dcc6f107c9af58c52f8c729645e1f4e146dfca1 100644 (file)
@@ -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 ();
 
index 52438d54b428a568195459aa1e55e3a57a4818fc..a88c57040958e06b6f4a5db3e0400eda459a305c 100644 (file)
@@ -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);
index 3ecfd3c6cd29c4aed952c7471dcc638a12576bbc..bccc849d54aa013d2536176cd6f5b8a99cd0ce5d 100644 (file)
@@ -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);
This page took 0.050049 seconds and 4 git commands to generate.