]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* blockframe.c, frame.h (reinit_frame_cache): New function.
authorJim Kingdon <jkingdon@engr.sgi.com>
Wed, 24 Apr 1991 16:56:40 +0000 (16:56 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Wed, 24 Apr 1991 16:56:40 +0000 (16:56 +0000)
solib.c (solib_add), symfile.c ({,add_}symbol_file_command):
Use it.

gdb/ChangeLog
gdb/blockframe.c
gdb/solib.c
gdb/symfile.c

index d758c6ed3b0d02a80266f1a3c1acbf56c97e6de1..9dbf8e48d80e4875e3432e0f00af2e1c480f3a8e 100644 (file)
@@ -1,3 +1,9 @@
+Wed Apr 24 09:45:17 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)
+
+       * blockframe.c, frame.h (reinit_frame_cache): New function.
+       solib.c (solib_add), symfile.c ({,add_}symbol_file_command):
+       Use it.
+
 Tue Apr 23 10:38:41 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)
 
        * symtab.c (lookup_symbol): Add 3 more of those loops through
index 7971166a3c09edd72769147503ca9d757f72cd16..93d26cd3208f2ebf0ba322be5390fe03692cb473 100644 (file)
@@ -146,6 +146,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
index def9fd6757e9cc3fbf0fa2734b0f65e5ed3291f3..0faf26036641c854e2e8ffd36585d1cf08f23f78 100644 (file)
@@ -31,6 +31,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "gdbcore.h"
 #include "command.h"
 #include "target.h"
+#include "frame.h"
 
 /*
 **     local data declarations
@@ -249,6 +250,10 @@ int from_tty;
     else if (val = (char *) re_comp (arg_string)) {
        error ("Invalid regexp: %s", val);
     }
+
+    /* Getting new symbols may change our opinion about what is
+       frameless.  */
+    reinit_frame_cache ();
  
     printf_filtered ("All shared libraries");
     if (arg_string)
index 395d7306ddffe2dfc2992ee9787eb245cfbc3075..5241959dc0ca8a17b80ed27e36e2cb4ee665bae3 100644 (file)
@@ -511,6 +511,10 @@ symbol_file_command (name, from_tty)
       return;
     }
 
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  reinit_frame_cache ();
+
   symbol_file_add (name, from_tty, (CORE_ADDR)0, 1);
 }
 
@@ -610,6 +614,10 @@ add_symbol_file_command (args, from_tty)
      char *args;
      int from_tty;
 {
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  reinit_frame_cache ();
+
   target_add_syms (args, from_tty);
 }