]> Git Repo - binutils.git/blobdiff - gdb/blockframe.c
*** empty log message ***
[binutils.git] / gdb / blockframe.c
index 7971166a3c09edd72769147503ca9d757f72cd16..7efe14112706b8637a519dab63832d1af6e143ef 100644 (file)
@@ -4,20 +4,21 @@
 
 This file is part of GDB.
 
-GDB is free software; you can redistribute it and/or modify
+This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-GDB is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GDB; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
+#include <stdio.h>
 #include "defs.h"
 #include "param.h"
 #include "symtab.h"
@@ -146,6 +147,17 @@ flush_cached_frames ()
   current_frame = (struct frame_info *) 0; /* Invalidate cache */
 }
 
+/* Flush the frame cache, and start a new one if necessary.  */
+void
+reinit_frame_cache ()
+{
+  FRAME fr = current_frame;
+  flush_cached_frames ();
+  if (fr)
+    set_current_frame ( create_new_frame (read_register (FP_REGNUM),
+                                         read_pc ()));
+}
+
 /* Return a structure containing various interesting information
    about a specified stack frame.  */
 /* How do I justify including this function?  Well, the FRAME
@@ -179,7 +191,13 @@ frameless_look_for_prologue (frame)
   if (func_start)
     {
       after_prologue = func_start;
+#ifdef SKIP_PROLOGUE_FRAMELESS_P
+      /* This is faster, since only care whether there *is* a prologue,
+        not how long it is.  */
+      SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
+#else
       SKIP_PROLOGUE (after_prologue);
+#endif
       return after_prologue == func_start;
     }
   else
@@ -564,7 +582,7 @@ find_pc_partial_function (pc, name, address)
       cache_pc_function_low = pc - FUNCTION_START_OFFSET;
   }
   cache_pc_function_name = misc_function_vector[miscfunc].name;
-  if (miscfunc < misc_function_count && 1 /* FIXME mf_text again? */ )
+  if (miscfunc < misc_function_count /* && FIXME mf_text again? */ )
     cache_pc_function_high = misc_function_vector[miscfunc+1].address;
   else
     cache_pc_function_high = cache_pc_function_low + 1;
This page took 0.026091 seconds and 4 git commands to generate.