]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* symfile.c (symbol_file_add): Move reinit_frame_cache call to
authorPeter Schauer <Peter.Schauer@mytum.de>
Sun, 28 Aug 1994 13:57:48 +0000 (13:57 +0000)
committerPeter Schauer <Peter.Schauer@mytum.de>
Sun, 28 Aug 1994 13:57:48 +0000 (13:57 +0000)
the callers of symbol_file_add. Gets rid of heuristic fence-post
warnings on mips and alpha targets when the PC resides in a shared
library which is not yet read in.
* coff-solib.c (coff_solib_add), cxux-nat.c (add_shared_symbol_files),
irix5-nat.c (solib_add), osfsolib.c (solib_add),
remote-vx.c (vx_open), solib.c (solib_add):
Add call to reinit_frame_cache after all shared libraries are read in.
* remote-udi.c (udi_load), remote-vx.c (vx_load_command),
symfile.c (symbol_file_command, add_symbol_file_command):
Add call to reinit_frame_cache after symbol_file_add.

gdb/ChangeLog
gdb/coff-solib.c
gdb/cxux-nat.c
gdb/irix5-nat.c
gdb/osfsolib.c
gdb/remote-udi.c
gdb/remote-vx.c

index c3a130ca22e0d4a68795c6d9a68f2492a54bb43b..6911fc4485a4f721ee70906e7ba90936ad9416b9 100644 (file)
@@ -1,3 +1,17 @@
+Sat Aug 27 23:32:43 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
+
+       * symfile.c (symbol_file_add):  Move reinit_frame_cache call to
+       the callers of symbol_file_add. Gets rid of heuristic fence-post
+       warnings on mips and alpha targets when the PC resides in a shared
+       library which is not yet read in.
+       * coff-solib.c (coff_solib_add), cxux-nat.c (add_shared_symbol_files),
+       irix5-nat.c (solib_add), osfsolib.c (solib_add),
+       remote-vx.c (vx_open), solib.c (solib_add):
+       Add call to reinit_frame_cache after all shared libraries are read in.
+       * remote-udi.c (udi_load), remote-vx.c (vx_load_command),
+       symfile.c (symbol_file_command, add_symbol_file_command):
+       Add call to reinit_frame_cache after symbol_file_add.
+
 Wed Aug 24 17:45:14 1994  J.T. Conklin  (jtc@cygnus.com)
 
        * config/xm-nbsd.h: New file, support for all NetBSD ports.
@@ -109,7 +123,7 @@ Fri Aug 19 14:55:45 1994  Stan Shebs  (shebs@andros.cygnus.com)
 Fri Aug 19 13:35:01 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
 
        * c-typeprint.c (c_print_type):  Assume demangled arguments
-       if a '(' is found in varstring, Looking for ')' at the end of
+       if a '(' is found in varstring, looking for ')' at the end of
        varstring did fail with demangled const member functions, which
        have a trailing `const'.
        * remote.c (get_offsets, putpkt):  Change to `char' buffers,
index 697fdac2d2a22c8051985a5ddcb37f82a486f49f..4b8ab00024d8d5644848bf6fc128742417f6b223 100644 (file)
@@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
 
+#include "frame.h"
 #include "bfd.h"
 #include "gdbcore.h"
 #include "symtab.h"
@@ -97,6 +98,10 @@ coff_solib_add (arg_string, from_tty, target)
          libsize -= len * 4;
          lib += len * 4;
        }
+
+      /* Getting new symbols may change our opinion about what is
+        frameless.  */
+      reinit_frame_cache ();
     }
 }
 
index 6216ede6d725a9e2e2a56269f562b40968b3be28..b36abcef72b36a779b51e1b440c2681a11faa1fd 100644 (file)
@@ -392,6 +392,10 @@ add_shared_symbol_files ()
         the symbols the user actually gets. */
       lm = lms.l_prev;
     }
+
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  reinit_frame_cache ();
 }
 
 int target_is_m88110;
index 74004d41d4a1d7ac0e6eafbb0ae5701db3d8956b..2831b9c61bb8cd8c3d89943a029032a12e60103f 100644 (file)
@@ -607,6 +607,7 @@ solib_add (arg_string, from_tty, target)
   char *re_err;
   int count;
   int old;
+  int symbols_added = 0;
   
   if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
     {
@@ -614,9 +615,7 @@ solib_add (arg_string, from_tty, target)
     }
   
   /* Add the shared library sections to the section table of the
-     specified target, if any. We have to do this before reading the
-     symbol files as symbol_file_add calls reinit_frame_cache and
-     creating a new frame might access memory in the shared library.  */
+     specified target, if any.  */
   if (target)
     {
       /* Count how many new section_table entries there are.  */
@@ -683,9 +682,15 @@ solib_add (arg_string, from_tty, target)
            {
              so_last = so;
              so -> symbols_loaded = 1;
+             symbols_added = 1;
            }
        }
     }
+
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  if (symbols_added)
+    reinit_frame_cache ();
 }
 
 /*
index 054d5841bf74a64c7b0af190fcb4ac66daadc427..6232ea1b7914999132374a3bd234964bf1bf4780 100644 (file)
@@ -473,6 +473,7 @@ solib_add (arg_string, from_tty, target)
   char *re_err;
   int count;
   int old;
+  int symbols_added = 0;
   
   if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
     {
@@ -481,9 +482,7 @@ solib_add (arg_string, from_tty, target)
   
   
   /* Add the shared library sections to the section table of the
-     specified target, if any. We have to do this before reading the
-     symbol files as symbol_file_add calls reinit_frame_cache and
-     creating a new frame might access memory in the shared library.  */
+     specified target, if any.  */
   if (target)
     {
       /* Count how many new section_table entries there are.  */
@@ -551,9 +550,15 @@ solib_add (arg_string, from_tty, target)
            {
              so_last = so;
              so -> symbols_loaded = 1;
+             symbols_added = 1;
            }
        }
     }
+
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  if (symbols_added)
+    reinit_frame_cache ();
 }
 
 /*
@@ -752,7 +757,7 @@ solib_create_inferior_hook()
     }
   while (stop_signal != TARGET_SIGNAL_TRAP);
 
-  /*  solib_add will call reinit_frame_cache via symbol_file_add.
+  /*  solib_add will call reinit_frame_cache.
       But we are stopped in the runtime loader and we do not have symbols
       for the runtime loader. So heuristic_proc_start will be called
       and will put out an annoying warning.
index 4cbcbabfc0908d008e7996406bd1725da0282725..be79608cf95a5ef2ccaad0c1ec89c48e460664fe 100644 (file)
@@ -32,6 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
        MiniMON interface with UDI-p interface.   */
  
 #include "defs.h"
+#include "frame.h"
 #include "inferior.h"
 #include "wait.h"
 #include "value.h"
@@ -1293,6 +1294,10 @@ udi_load(args, from_tty)
   download (args, from_tty);
 
   symbol_file_add (strtok (args, " \t"), from_tty, 0, 0, 0, 0);
+
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  reinit_frame_cache ();
 }
 
 /*************************************************** UDI_WRITE_INFERIOR_MEMORY
index 15ca4aeb70d42abfeea9fc5be0a64195e504a0f7..c8625f59088b8be3073487c52008434a7d6f4a7f 100644 (file)
@@ -642,6 +642,10 @@ vx_load_command (arg_string, from_tty)
 
   /* FIXME, for now we ignore data_addr and bss_addr.  */
   symbol_file_add (arg_string, from_tty, text_addr, 0, 0, 0);
+
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  reinit_frame_cache ();
 }
 
 #ifdef FIXME  /* Not ready for prime time */
@@ -1002,6 +1006,7 @@ vx_open (args, from_tty)
   struct ldfile *pLoadFile;
   int i;
   extern CLIENT *pClient;
+  int symbols_added = 0;
 
   if (!args)
     error_no_arg ("target machine name");
@@ -1077,13 +1082,19 @@ vx_open (args, from_tty)
       /* Botches, FIXME:
         (1)  Searches the PATH, not the source path.
         (2)  data and bss are assumed to be at the usual offsets from text.  */
-      catch_errors (add_symbol_stub, (char *)pLoadFile, (char *)0,
-                   RETURN_MASK_ALL);
+      if (catch_errors (add_symbol_stub, (char *)pLoadFile, (char *)0,
+                       RETURN_MASK_ALL))
+       symbols_added = 1;
 #endif
     }
   printf_filtered ("Done.\n");
 
   clnt_freeres (pClient, xdr_ldtabl, &loadTable);
+
+  /* Getting new symbols may change our opinion about what is
+     frameless.  */
+  if (symbols_added)
+    reinit_frame_cache ();
 }
 \f
 /* Takes a task started up outside of gdb and ``attaches'' to it.