Honour PRIVATE keyword
[deliverable/binutils-gdb.git] / gdb / frame.c
index 455d560a65b1842d3472b8d3172d335ef38be7a5..a032c47e92b1437dc33550c2128d5ea648e4dd4d 100644 (file)
@@ -234,7 +234,6 @@ get_frame_id (struct frame_info *fi)
             directly.  Unfortunately, legacy code, called by
             legacy_get_prev_frame, explicitly set the frames type
             using the method deprecated_set_frame_type().  */
-         gdb_assert (fi->unwind->type != UNKNOWN_FRAME);
          fi->type = fi->unwind->type;
        }
       /* Find THIS frame's ID.  */
@@ -510,9 +509,10 @@ frame_register_unwind (struct frame_info *frame, int regnum,
 
   if (frame_debug)
     {
-      fprintf_unfiltered (gdb_stdlog,
-                         "{ frame_register_unwind (frame=%d,regnum=\"%s\",...) ",
-                         frame->level, frame_map_regnum_to_name (frame, regnum));
+      fprintf_unfiltered (gdb_stdlog, "\
+{ frame_register_unwind (frame=%d,regnum=%d(%s),...) ",
+                         frame->level, regnum,
+                         frame_map_regnum_to_name (frame, regnum));
     }
 
   /* Require all but BUFFERP to be valid.  A NULL BUFFERP indicates
@@ -538,7 +538,6 @@ frame_register_unwind (struct frame_info *frame, int regnum,
         directly.  Unfortunately, legacy code, called by
         legacy_get_prev_frame, explicitly set the frames type using
         the method deprecated_set_frame_type().  */
-      gdb_assert (frame->unwind->type != UNKNOWN_FRAME);
       frame->type = frame->unwind->type;
     }
 
@@ -1029,9 +1028,12 @@ legacy_saved_regs_this_id (struct frame_info *next_frame,
                           void **this_prologue_cache,
                           struct frame_id *id)
 {
-  /* legacy_get_prev_frame() always sets ->this_id.p, hence this is
-     never needed.  */
-  internal_error (__FILE__, __LINE__, "legacy_saved_regs_this_id() called");
+  /* A developer is trying to bring up a new architecture, help them
+     by providing a default unwinder that refuses to unwind anything
+     (the ID is always NULL).  In the case of legacy code,
+     legacy_get_prev_frame() will have previously set ->this_id.p, so
+     this code won't be called.  */
+  (*id) = null_frame_id;
 }
        
 const struct frame_unwind legacy_saved_regs_unwinder = {
@@ -1225,12 +1227,6 @@ get_next_frame (struct frame_info *this_frame)
     return NULL;
 }
 
-struct frame_info *
-deprecated_get_next_frame_hack (struct frame_info *this_frame)
-{
-  return this_frame->next;
-}
-
 /* Flush the entire frame cache.  */
 
 void
@@ -1284,7 +1280,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
   prev = FRAME_OBSTACK_ZALLOC (struct frame_info);
   prev->level = this_frame->level + 1;
 
-  /* Do not completly wire it in to the frame chain.  Some (bad) code
+  /* Do not completely wire it in to the frame chain.  Some (bad) code
      in INIT_FRAME_EXTRA_INFO tries to look along frame->prev to pull
      some fancy tricks (of course such code is, by definition,
      recursive).
@@ -1453,7 +1449,8 @@ legacy_get_prev_frame (struct frame_info *this_frame)
        the frame chain, not just the inner most frame!  The generic,
        per-architecture, frame code should handle this and the below
        should simply be removed.  */
-    fromleaf = FRAMELESS_FUNCTION_INVOCATION (this_frame);
+    fromleaf = (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()
+               && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (this_frame));
   else
     fromleaf = 0;
 
@@ -2133,7 +2130,6 @@ get_frame_type (struct frame_info *frame)
         directly.  Unfortunately, legacy code, called by
         legacy_get_prev_frame, explicitly set the frames type using
         the method deprecated_set_frame_type().  */
-      gdb_assert (frame->unwind->type != UNKNOWN_FRAME);
       frame->type = frame->unwind->type;
     }
   if (frame->type == UNKNOWN_FRAME)
This page took 0.027843 seconds and 4 git commands to generate.