*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / irix5-nat.c
index 20c05f37901ae04da12a55c188ad116e0050a065..459abe3879c8cd35912aab67734c74d80d3c7eba 100644 (file)
@@ -434,7 +434,7 @@ solib_map_sections (void *arg)
     }
   /* Leave bfd open, core_xfer_memory and "info files" need it.  */
   so->abfd = abfd;
-  abfd->cacheable = true;
+  abfd->cacheable = 1;
 
   if (!bfd_check_format (abfd, bfd_object))
     {
@@ -862,14 +862,14 @@ symbol_add_stub (void *arg)
    SYNOPSIS
 
    void solib_add (char *arg_string, int from_tty,
-   struct target_ops *target)
+   struct target_ops *target, int readsyms)
 
    DESCRIPTION
 
  */
 
 void
-solib_add (char *arg_string, int from_tty, struct target_ops *target)
+solib_add (char *arg_string, int from_tty, struct target_ops *target, int readsyms)
 {
   register struct so_list *so = NULL;  /* link map state variable */
 
@@ -880,6 +880,9 @@ solib_add (char *arg_string, int from_tty, struct target_ops *target)
   int count;
   int old;
 
+  if (!readsyms)
+    return;
+
   if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
     {
       error ("Invalid regexp: %s", re_err);
@@ -1061,6 +1064,7 @@ clear_solib (void)
        }
       if (so_list_head->abfd)
        {
+         remove_target_sections (so_list_head->abfd);
          bfd_filename = bfd_get_filename (so_list_head->abfd);
          if (!bfd_close (so_list_head->abfd))
            warning ("cannot close \"%s\": %s",
@@ -1224,7 +1228,7 @@ solib_create_inferior_hook (void)
   stop_signal = TARGET_SIGNAL_0;
   do
     {
-      target_resume (-1, 0, stop_signal);
+      target_resume (pid_to_ptid (-1), 0, stop_signal);
       wait_for_inferior ();
     }
   while (stop_signal != TARGET_SIGNAL_TRAP);
@@ -1251,8 +1255,7 @@ solib_create_inferior_hook (void)
      and will put out an annoying warning.
      Delaying the resetting of stop_soon_quietly until after symbol loading
      suppresses the warning.  */
-  if (auto_solib_add)
-    solib_add ((char *) 0, 0, (struct target_ops *) 0);
+  solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
   stop_soon_quietly = 0;
 }
 
@@ -1274,7 +1277,7 @@ static void
 sharedlibrary_command (char *args, int from_tty)
 {
   dont_repeat ();
-  solib_add (args, from_tty, (struct target_ops *) 0);
+  solib_add (args, from_tty, (struct target_ops *) 0, 1);
 }
 
 void
@@ -1286,13 +1289,13 @@ _initialize_solib (void)
            "Status of loaded shared object libraries.");
 
   add_show_from_set
-    (add_set_cmd ("auto-solib-add", class_support, var_zinteger,
+    (add_set_cmd ("auto-solib-add", class_support, var_boolean,
                  (char *) &auto_solib_add,
                  "Set autoloading of shared library symbols.\n\
-If nonzero, symbols from all shared object libraries will be loaded\n\
-automatically when the inferior begins execution or when the dynamic linker\n\
-informs gdb that a new library has been loaded.  Otherwise, symbols\n\
-must be loaded manually, using `sharedlibrary'.",
+If \"on\", symbols from all shared object libraries will be loaded\n\
+automatically when the inferior begins execution, when the dynamic linker\n\
+informs gdb that a new library has been loaded, or when attaching to the\n\
+inferior.  Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
                  &setlist),
      &showlist);
 }
This page took 0.025303 seconds and 4 git commands to generate.