2004-06-07 Randolph Chung <tausq@debian.org>
[deliverable/binutils-gdb.git] / gdb / frame.c
index 8fb0344220218f226f72cfdd1a473b15ba97a301..f3e94c90d238c03d650f557065b42191f6ff4757 100644 (file)
@@ -1062,8 +1062,9 @@ const struct frame_unwind *legacy_saved_regs_unwind = &legacy_saved_regs_unwinde
 static enum frame_type
 frame_type_from_pc (CORE_ADDR pc)
 {
-  if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
-      && deprecated_pc_in_call_dummy (pc, 0, 0))
+  /* NOTE: cagney/2004-05-08: Eliminating this function depends on all
+     architectures being forced to use the frame-unwind code.  */
+  if (deprecated_pc_in_call_dummy (pc, 0, 0))
     return DUMMY_FRAME;
   else
     return NORMAL_FRAME;
@@ -1581,8 +1582,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
      has previously set it.  This is really somewhat bogus.  The
      initialization, as seen in create_new_frame(), should occur
      before the INIT function has been called.  */
-  if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
-      && deprecated_pc_in_call_dummy (get_frame_pc (prev), 0, 0))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (prev), 0, 0))
     prev->type = DUMMY_FRAME;
 
   if (prev->type == NORMAL_FRAME)
@@ -1609,6 +1609,7 @@ static struct frame_info *
 get_prev_frame_1 (struct frame_info *this_frame)
 {
   struct frame_info *prev_frame;
+  struct frame_id this_id;
 
   gdb_assert (this_frame != NULL);
 
@@ -1646,7 +1647,8 @@ get_prev_frame_1 (struct frame_info *this_frame)
   /* Check that this frame's ID was valid.  If it wasn't, don't try to
      unwind to the prev frame.  Be careful to not apply this test to
      the sentinel frame.  */
-  if (this_frame->level >= 0 && !frame_id_p (get_frame_id (this_frame)))
+  this_id = get_frame_id (this_frame);
+  if (this_frame->level >= 0 && !frame_id_p (this_id))
     {
       if (frame_debug)
        {
@@ -1663,16 +1665,14 @@ get_prev_frame_1 (struct frame_info *this_frame)
      go backwards) and sentinel frames (the test is meaningless).  */
   if (this_frame->next->level >= 0
       && this_frame->next->type != SIGTRAMP_FRAME
-      && frame_id_inner (get_frame_id (this_frame),
-                        get_frame_id (this_frame->next)))
+      && frame_id_inner (this_id, get_frame_id (this_frame->next)))
     error ("Previous frame inner to this frame (corrupt stack?)");
 
   /* Check that this and the next frame are not identical.  If they
      are, there is most likely a stack cycle.  As with the inner-than
      test above, avoid comparing the inner-most and sentinel frames.  */
   if (this_frame->level > 0
-      && frame_id_eq (get_frame_id (this_frame),
-                     get_frame_id (this_frame->next)))
+      && frame_id_eq (this_id, get_frame_id (this_frame->next)))
     error ("Previous frame identical to this frame (corrupt stack?)");
 
   /* Allocate the new frame but do not wire it in to the frame chain.
@@ -1983,12 +1983,6 @@ frame_relative_level (struct frame_info *fi)
 enum frame_type
 get_frame_type (struct frame_info *frame)
 {
-  /* Some targets still don't use [generic] dummy frames.  Catch them
-     here.  */
-  if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES
-      && deprecated_frame_in_dummy (frame))
-    return DUMMY_FRAME;
-
   /* Some legacy code, e.g, mips_init_extra_frame_info() wants
      to determine the frame's type prior to it being completely
      initialized.  Don't attempt to lazily initialize ->unwind for
This page took 0.024543 seconds and 4 git commands to generate.