Don't always build coffgen.o
[deliverable/binutils-gdb.git] / gdb / solib.c
index 7956455139240a6dc5bfe849618aff0aaff3b866..ce9dc05f9ada9911b71f2037e8c6c27a354a9350 100644 (file)
@@ -1,6 +1,6 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 1990-2013 Free Software Foundation, Inc.
+   Copyright (C) 1990-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 #include <sys/types.h>
 #include <fcntl.h>
-#include <string.h>
 #include "symtab.h"
 #include "bfd.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "exceptions.h"
 #include "gdbcore.h"
 #include "command.h"
 #include "target.h"
@@ -604,8 +602,6 @@ master_so_list (void)
 int
 solib_read_symbols (struct so_list *so, int flags)
 {
-  const int from_tty = flags & SYMFILE_VERBOSE;
-
   if (so->symbols_loaded)
     {
       /* If needed, we've already warned in our caller.  */
@@ -649,11 +645,7 @@ solib_read_symbols (struct so_list *so, int flags)
                                            " library symbols for %s:\n"),
                           so->so_name);
       else
-       {
-         if (from_tty || info_verbose)
-           printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name);
-         so->symbols_loaded = 1;
-       }
+       so->symbols_loaded = 1;
       return 1;
     }
 
@@ -900,11 +892,22 @@ libpthread_solib_p (struct so_list *so)
    FROM_TTY and TARGET are as described for update_solib_list, above.  */
 
 void
-solib_add (char *pattern, int from_tty,
+solib_add (const char *pattern, int from_tty,
           struct target_ops *target, int readsyms)
 {
   struct so_list *gdb;
 
+  if (print_symbol_loading_p (from_tty, 0, 0))
+    {
+      if (pattern != NULL)
+       {
+         printf_unfiltered (_("Loading symbols for shared libraries: %s\n"),
+                            pattern);
+       }
+      else
+       printf_unfiltered (_("Loading symbols for shared libraries.\n"));
+    }
+
   current_program_space->solib_add_generation++;
 
   if (pattern)
@@ -1277,6 +1280,9 @@ reload_shared_libraries_1 (int from_tty)
   struct so_list *so;
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
 
+  if (print_symbol_loading_p (from_tty, 0, 0))
+    printf_unfiltered (_("Loading symbols for shared libraries.\n"));
+
   for (so = so_list_head; so != NULL; so = so->next)
     {
       char *filename, *found_pathname = NULL;
@@ -1398,11 +1404,11 @@ show_auto_solib_add (struct ui_file *file, int from_tty,
    the library-specific handler if it is installed for the current target.  */
 
 struct symbol *
-solib_global_lookup (const struct objfile *objfile,
+solib_global_lookup (struct objfile *objfile,
                     const char *name,
                     const domain_enum domain)
 {
-  const struct target_so_ops *ops = solib_ops (target_gdbarch ());
+  const struct target_so_ops *ops = solib_ops (get_objfile_arch (objfile));
 
   if (ops->lookup_lib_global_symbol != NULL)
     return ops->lookup_lib_global_symbol (objfile, name, domain);
This page took 0.026003 seconds and 4 git commands to generate.