This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Delete DEPRECATED_PUSH_DUMMY_FRAME


Only required by non-generic-dummy-frame code, and generic dummy frames are assumed.

committed,
Andrew

2004-05-08  Andrew Cagney  <cagney@redhat.com>

	* gdbarch.sh (DEPRECATED_PUSH_DUMMY_FRAME): Delete.
	* gdbarch.h, gdbarch.c: Re-generate.
	* inferior.h (PUSH_DUMMY_FRAME): Delete macro.
	* infcall.c (call_function_by_hand): Eliminate call to
	DEPRECATED_PUSH_DUMMY_FRAME.
	* ns32k-tdep.c (ns32k_gdbarch_init): Do not set deprecated
	push_dummy_frame.
	(ns32k_push_dummy_frame): Delete function.

Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.287
diff -p -u -r1.287 gdbarch.c
--- gdbarch.c	8 May 2004 20:16:33 -0000	1.287
+++ gdbarch.c	8 May 2004 20:47:40 -0000
@@ -166,7 +166,6 @@ struct gdbarch
   int deprecated_sizeof_call_dummy_words;
   gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
   gdbarch_push_dummy_code_ftype *push_dummy_code;
-  gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
   gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
   gdbarch_print_registers_info_ftype *print_registers_info;
   gdbarch_print_float_info_ftype *print_float_info;
@@ -323,7 +322,6 @@ struct gdbarch startup_gdbarch =
   0,  /* deprecated_sizeof_call_dummy_words */
   0,  /* deprecated_fix_call_dummy */
   0,  /* push_dummy_code */
-  0,  /* deprecated_push_dummy_frame */
   0,  /* deprecated_do_registers_info */
   default_print_registers_info,  /* print_registers_info */
   0,  /* print_float_info */
@@ -617,7 +615,6 @@ verify_gdbarch (struct gdbarch *current_
   /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
   /* Skip verify of deprecated_fix_call_dummy, has predicate */
   /* Skip verify of push_dummy_code, has predicate */
-  /* Skip verify of deprecated_push_dummy_frame, has predicate */
   /* Skip verify of deprecated_do_registers_info, has predicate */
   /* Skip verify of print_registers_info, invalid_p == 0 */
   /* Skip verify of print_float_info, has predicate */
@@ -1300,25 +1297,6 @@ gdbarch_dump (struct gdbarch *current_gd
                       (long) current_gdbarch->deprecated_push_arguments
                       /*DEPRECATED_PUSH_ARGUMENTS ()*/);
 #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
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_PUSH_DUMMY_FRAME(-)",
-                      XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
-  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_PUSH_RETURN_ADDRESS_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -3342,30 +3320,6 @@ set_gdbarch_push_dummy_code (struct gdba
                              gdbarch_push_dummy_code_ftype push_dummy_code)
 {
   gdbarch->push_dummy_code = push_dummy_code;
-}
-
-int
-gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_push_dummy_frame != NULL;
-}
-
-void
-gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
-  gdbarch->deprecated_push_dummy_frame ();
-}
-
-void
-set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
-                                         gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
-{
-  gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
 }
 
 int
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.250
diff -p -u -r1.250 gdbarch.h
--- gdbarch.h	8 May 2004 20:16:34 -0000	1.250
+++ gdbarch.h	8 May 2004 20:47:42 -0000
@@ -885,33 +885,6 @@ typedef CORE_ADDR (gdbarch_push_dummy_co
 extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr);
 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
 
-/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_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
-
-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
-
-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 !defined (DEPRECATED_PUSH_DUMMY_FRAME)
-#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
-#endif
-
 #if defined (DEPRECATED_DO_REGISTERS_INFO)
 /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
 #if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.314
diff -p -u -r1.314 gdbarch.sh
--- gdbarch.sh	8 May 2004 20:16:34 -0000	1.314
+++ gdbarch.sh	8 May 2004 20:47:44 -0000
@@ -534,8 +534,6 @@ v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:in
 F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
 # This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al.
 M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
-# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME.
-F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-
 
 F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
 m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.44
diff -p -u -r1.44 infcall.c
--- infcall.c	8 May 2004 19:38:34 -0000	1.44
+++ infcall.c	8 May 2004 20:47:44 -0000
@@ -324,34 +324,23 @@ call_function_by_hand (struct value *fun
   inf_status = save_inferior_status (1);
   inf_status_cleanup = make_cleanup_restore_inferior_status (inf_status);
 
-  if (DEPRECATED_PUSH_DUMMY_FRAME_P ())
-    {
-      /* DEPRECATED_PUSH_DUMMY_FRAME is responsible for saving the
-	 inferior registers (and frame_pop() 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.
+  /* 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 ptid as a parameter, and returns a dummy
-      frame handle.  The handle can then be used further down as a
-      parameter to generic_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.
+     A follow-on change is to modify this interface so that it takes
+     thread OR frame OR ptid as a parameter, and returns a dummy frame
+     handle.  The handle can then be used further down as a parameter
+     to generic_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 ();
-    }
+     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 ();
 
   /* Ensure that the initial SP is correctly aligned.  */
   {
Index: inferior.h
===================================================================
RCS file: /cvs/src/src/gdb/inferior.h,v
retrieving revision 1.63
diff -p -u -r1.63 inferior.h
--- inferior.h	8 May 2004 18:37:17 -0000	1.63
+++ inferior.h	8 May 2004 20:47:46 -0000
@@ -443,10 +443,6 @@ extern int attach_flag;
 /* FIXME: cagney/2000-04-17: gdbarch should manage this.  The default
    shouldn't be necessary. */
 
-#if !defined PUSH_DUMMY_FRAME
-#define PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "PUSH_DUMMY_FRAME"), 0)
-#endif
-
 #if !defined STORE_STRUCT_RETURN
 #define STORE_STRUCT_RETURN(a1,a2) (internal_error (__FILE__, __LINE__, "STORE_STRUCT_RETURN"), 0)
 #endif
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.71
diff -p -u -r1.71 ns32k-tdep.c
--- ns32k-tdep.c	8 May 2004 20:16:34 -0000	1.71
+++ ns32k-tdep.c	8 May 2004 20:47:46 -0000
@@ -399,22 +399,6 @@ ns32k_frame_init_saved_regs (struct fram
 }
 
 static void
-ns32k_push_dummy_frame (void)
-{
-  CORE_ADDR sp = read_register (SP_REGNUM);
-  int regnum;
-
-  sp = push_word (sp, read_register (PC_REGNUM));
-  sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM));
-  write_register (DEPRECATED_FP_REGNUM, sp);
-
-  for (regnum = 0; regnum < 8; regnum++)
-    sp = push_word (sp, read_register (regnum));
-
-  write_register (SP_REGNUM, sp);
-}
-
-static void
 ns32k_pop_frame (void)
 {
   struct frame_info *frame = get_current_frame ();
@@ -574,7 +558,6 @@ ns32k_gdbarch_init (struct gdbarch_info 
   set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
 
   /* Call dummy info */
-  set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
   set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame);
   set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
   set_gdbarch_deprecated_call_dummy_words (gdbarch, ns32k_call_dummy_words);
Index: doc/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/doc/ChangeLog,v
retrieving revision 1.411
diff -p -u -r1.411 ChangeLog
--- doc/ChangeLog	8 May 2004 20:16:34 -0000	1.411
+++ doc/ChangeLog	8 May 2004 20:47:48 -0000
@@ -1,6 +1,9 @@
 2004-05-08  Andrew Cagney  <cagney@redhat.com>
 
 	* gdbint.texinfo (Target Architecture Definition): Delete
+	description of DEPRECATED_PUSH_DUMMY_FRAME.
+
+	* gdbint.texinfo (Target Architecture Definition): Delete
 	reference to DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET.
 
 2004-05-07  Andrew Cagney  <cagney@redhat.com>
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.199
diff -p -u -r1.199 gdbint.texinfo
--- doc/gdbint.texinfo	8 May 2004 20:16:34 -0000	1.199
+++ doc/gdbint.texinfo	8 May 2004 20:47:50 -0000
@@ -3705,10 +3705,6 @@ This method replaces @code{DEPRECATED_CA
 @code{CALL_DUMMY_LOCATION}, @code{DEPRECATED_REGISTER_SIZE}, and
 @code{DEPRECATED_FIX_CALL_DUMMY}.
 
-@item DEPRECATED_PUSH_DUMMY_FRAME
-@findex DEPRECATED_PUSH_DUMMY_FRAME
-Used in @samp{call_function_by_hand} to create an artificial stack frame.
-
 @item DEPRECATED_REGISTER_BYTES
 @findex DEPRECATED_REGISTER_BYTES
 The total amount of space needed to store @value{GDBN}'s copy of the

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]