* somsolib.c (som_solib_add): Ignore the solib limit threshhold
[binutils-gdb.git] / gdb / somsolib.c
index 5f2b2cbc88f80d5d965e78aec187548b2f55280d..d623e4b76db9aceeb39462baa43d8fb1c79a6a5c 100644 (file)
@@ -406,7 +406,7 @@ som_solib_load_symbols (struct so_list *so, char *name, int from_tty,
    be exceeded.  */
 
 void
-som_solib_add (char *arg_string, int from_tty, struct target_ops *target)
+som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int readsyms)
 {
   struct minimal_symbol *msymbol;
   struct so_list *so_list_tail;
@@ -777,7 +777,8 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target)
       st_size = som_solib_sizeof_symbol_table (name);
       som_solib_st_size_threshold_exceeded =
        !from_tty &&
-       auto_solib_add &&
+       auto_solib_limit > 0 &&
+       readsyms &&
        ((st_size + som_solib_total_st_size) > (auto_solib_limit * (LONGEST) (1024 * 1024)));
 
       if (som_solib_st_size_threshold_exceeded)
@@ -868,15 +869,15 @@ som_solib_create_inferior_hook (void)
     return;
 
   have_endo = 0;
-  /* Slam the pid of the process into __d_pid; failing is only a warning!  */
+  /* Slam the pid of the process into __d_pid.
+
+     We used to warn when this failed, but that warning is only useful
+     on very old HP systems (hpux9 and older).  The warnings are an
+     annoyance to users of modern systems and foul up the testsuite as
+     well.  As a result, the warnings have been disabled.  */
   msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
   if (msymbol == NULL)
-    {
-      warning ("Unable to find __d_pid symbol in object file.");
-      warning ("Suggest linking with /opt/langtools/lib/end.o.");
-      warning ("GDB will be unable to track shl_load/shl_unload calls");
-      goto keep_going;
-    }
+    goto keep_going;
 
   anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
   store_unsigned_integer (buf, 4, PIDGET (inferior_ptid));
@@ -1470,7 +1471,7 @@ static void
 som_solib_sharedlibrary_command (char *args, int from_tty)
 {
   dont_repeat ();
-  som_solib_add (args, from_tty, (struct target_ops *) 0);
+  som_solib_add (args, from_tty, (struct target_ops *) 0, 1);
 }