2007-06-13 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / frame.c
index 2c62d441a6bbae2d4169af072a3118f736437dfa..42a44d42219be8c32cfc408edc85af595f7bffac 100644 (file)
@@ -382,7 +382,7 @@ frame_id_inner (struct frame_id l, struct frame_id r)
        comment in "frame.h", there is some fuzz here.  Frameless
        functions are not strictly inner than (same .stack but
        different .code and/or .special address).  */
-    inner = INNER_THAN (l.stack_addr, r.stack_addr);
+    inner = gdbarch_inner_than (current_gdbarch, l.stack_addr, r.stack_addr);
   if (frame_debug)
     {
       fprintf_unfiltered (gdb_stdlog, "{ frame_id_inner (l=");
@@ -1077,6 +1077,17 @@ frame_observer_target_changed (struct target_ops *target)
 void
 reinit_frame_cache (void)
 {
+  struct frame_info *fi;
+
+  /* Tear down all frame caches.  */
+  for (fi = current_frame; fi != NULL; fi = fi->prev)
+    {
+      if (fi->prologue_cache && fi->unwind->dealloc_cache)
+       fi->unwind->dealloc_cache (fi, fi->prologue_cache);
+      if (fi->base_cache && fi->base->unwind->dealloc_cache)
+       fi->base->unwind->dealloc_cache (fi, fi->base_cache);
+    }
+
   /* Since we can't really be sure what the first object allocated was */
   obstack_free (&frame_cache_obstack, 0);
   obstack_init (&frame_cache_obstack);
@@ -1712,10 +1723,6 @@ frame_sp_unwind (struct frame_info *next_frame)
      frame inner-most address.  */
   if (gdbarch_unwind_sp_p (current_gdbarch))
     return gdbarch_unwind_sp (current_gdbarch, next_frame);
-  /* Things are looking grim.  If it's the inner-most frame and there
-     is a TARGET_READ_SP, then that can be used.  */
-  if (next_frame->level < 0 && TARGET_READ_SP_P ())
-    return TARGET_READ_SP ();
   /* Now things are really are grim.  Hope that the value returned by
      the SP_REGNUM register is meaningful.  */
   if (SP_REGNUM >= 0)
This page took 0.026039 seconds and 4 git commands to generate.