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]

[ob] Delete deprecated_set_frame_type


Turns out it is no longer called (well except in i386-interix which can't even compile).

committed,
Andrew
2004-05-01  Andrew Cagney  <cagney@redhat.com>

	* frame.h (deprecated_set_frame_type): Delete declaration.
	* frame.c (deprecated_set_frame_type): Delete function, update
	comments.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.175
diff -p -u -r1.175 frame.c
--- frame.c	1 May 2004 00:52:36 -0000	1.175
+++ frame.c	1 May 2004 19:00:45 -0000
@@ -67,10 +67,10 @@ struct frame_info
   int level;
 
   /* The frame's type.  */
-  /* FIXME: cagney/2003-04-02: Should instead be returning
-     ->unwind->type.  Unfortunately, legacy code is still explicitly
-     setting the type using the method deprecated_set_frame_type.
-     Eliminate that method and this field can be eliminated.  */
+  /* FIXME: cagney/2004-05-01: Should instead just use ->unwind->type.
+     Unfortunately, legacy_get_prev_frame is still explicitly setting
+     the type.  Eliminate that method and this field can be
+     eliminated.  */
   enum frame_type type;
 
   /* For each register, address of where it was saved on entry to the
@@ -233,11 +233,10 @@ get_frame_id (struct frame_info *fi)
 	{
 	  fi->unwind = frame_unwind_find_by_frame (fi->next,
 						   &fi->prologue_cache);
-	  /* FIXME: cagney/2003-04-02: Rather than storing the frame's
-	     type in the frame, the unwinder's type should be returned
-	     directly.  Unfortunately legacy code, called by
-	     legacy_get_prev_frame(), explicitly sets the frame's type
-	     using the method deprecated_set_frame_type().  */
+	  /* FIXME: cagney/2004-05-01: Should instead just use
+	     ->unwind->type.  Unfortunately, legacy_get_prev_frame is
+	     still explicitly setting the type.  Eliminate that method
+	     and this field can be eliminated.  */
 	  fi->type = fi->unwind->type;
 	}
       /* Find THIS frame's ID.  */
@@ -548,11 +547,10 @@ frame_register_unwind (struct frame_info
     {
       frame->unwind = frame_unwind_find_by_frame (frame->next,
 						  &frame->prologue_cache);
-      /* FIXME: cagney/2003-04-02: Rather than storing the frame's
-	 type in the frame, the unwinder's type should be returned
-	 directly.  Unfortunately, legacy code, called by
-	 legacy_get_prev_frame(), explicitly set the frames type using
-	 the method deprecated_set_frame_type().  */
+      /* FIXME: cagney/2004-05-01: Should instead just use ->unwind->type.
+	 Unfortunately, legacy_get_prev_frame is still explicitly setting
+	 the type.  Eliminate that method and this field can be
+	 eliminated.  */
       frame->type = frame->unwind->type;
     }
 
@@ -1507,11 +1505,10 @@ legacy_get_prev_frame (struct frame_info
 	  /* Find PREV frame's unwinder.  */
 	  prev->unwind = frame_unwind_find_by_frame (this_frame,
 						     &prev->prologue_cache);
-	  /* FIXME: cagney/2003-04-02: Rather than storing the frame's
-	     type in the frame, the unwinder's type should be returned
-	     directly.  Unfortunately, legacy code, called by
-	     legacy_get_prev_frame(), explicitly set the frames type
-	     using the method deprecated_set_frame_type().  */
+	  /* FIXME: cagney/2004-05-01: Should instead just use
+	     ->unwind->type.  Unfortunately, legacy_get_prev_frame is
+	     still explicitly setting the type.  Eliminate that method
+	     and this field can be eliminated.  */
 	  prev->type = prev->unwind->type;
 	  /* Find PREV frame's ID.  */
 	  prev->unwind->this_id (this_frame,
@@ -2105,24 +2102,16 @@ get_frame_type (struct frame_info *frame
          provides the frame's type.  */
       frame->unwind = frame_unwind_find_by_frame (frame->next, 
 						  &frame->prologue_cache);
-      /* FIXME: cagney/2003-04-02: Rather than storing the frame's
-	 type in the frame, the unwinder's type should be returned
-	 directly.  Unfortunately, legacy code, called by
-	 legacy_get_prev_frame(), explicitly set the frames type using
-	 the method deprecated_set_frame_type().  */
+      /* FIXME: cagney/2004-05-01: Should instead just use
+	 ->unwind->type.  Unfortunately, legacy_get_prev_frame is
+	 still explicitly setting the type.  Eliminate that method and
+	 this field can be eliminated.  */
       frame->type = frame->unwind->type;
     }
   if (frame->type == UNKNOWN_FRAME)
     return NORMAL_FRAME;
   else
     return frame->type;
-}
-
-void
-deprecated_set_frame_type (struct frame_info *frame, enum frame_type type)
-{
-  /* Arrrg!  See comment in "frame.h".  */
-  frame->type = type;
 }
 
 struct frame_extra_info *
Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.129
diff -p -u -r1.129 frame.h
--- frame.h	1 May 2004 16:52:29 -0000	1.129
+++ frame.h	1 May 2004 19:00:45 -0000
@@ -343,9 +343,9 @@ extern int frame_relative_level (struct 
 enum frame_type
 {
   /* The frame's type hasn't yet been defined.  This is a catch-all
-     for legacy code that uses really strange technicques, such as
-     deprecated_set_frame_type, to set the frame's type.  New code
-     should not use this value.  */
+     for legacy_get_prev_frame that uses really strange techniques to
+     determine the frame's type.  New code should not use this
+     value.  */
   UNKNOWN_FRAME,
   /* A true stack frame, created by the target program during normal
      execution.  */
@@ -358,18 +358,6 @@ enum frame_type
   SIGTRAMP_FRAME
 };
 extern enum frame_type get_frame_type (struct frame_info *);
-
-/* FIXME: cagney/2002-11-10: Some targets want to directly mark a
-   frame as being of a specific type.  This shouldn't be necessary.
-   DEPRECATED_PC_IN_CALL_DUMMY() indicates a DUMMY_FRAME.  I suspect
-   the real problem here is that get_prev_frame() only sets
-   initialized after DEPRECATED_INIT_EXTRA_FRAME_INFO as been called.
-   Consequently, some targets found that the frame's type was wrong
-   and tried to fix it.  The correct fix is to modify get_prev_frame()
-   so that it initializes the frame's type before calling any other
-   functions.  */
-extern void deprecated_set_frame_type (struct frame_info *,
-				       enum frame_type type);
 
 /* Unwind the stack frame so that the value of REGNUM, in the previous
    (up, older) frame is returned.  If VALUEP is NULL, don't

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