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"
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
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
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;