aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1991-04-24 16:56:40 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1991-04-24 16:56:40 +0000
commit2403f49b376fd88066b676e92c95ca6f012f0e61 (patch)
tree14fd1ca0864952aa4ce62091e20ecd0ef43f152e /gdb
parent6a3958b22d9bb9e23d03ba1e4c20a5cde0be747f (diff)
downloadgdb-2403f49b376fd88066b676e92c95ca6f012f0e61.zip
gdb-2403f49b376fd88066b676e92c95ca6f012f0e61.tar.gz
gdb-2403f49b376fd88066b676e92c95ca6f012f0e61.tar.bz2
* blockframe.c, frame.h (reinit_frame_cache): New function.
solib.c (solib_add), symfile.c ({,add_}symbol_file_command): Use it.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/blockframe.c11
-rw-r--r--gdb/solib.c5
-rw-r--r--gdb/symfile.c8
4 files changed, 30 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d758c6e..9dbf8e4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 7971166..93d26cd 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -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
diff --git a/gdb/solib.c b/gdb/solib.c
index def9fd6..0faf260 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -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)
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 395d730..5241959 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -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);
}