Return gdbpy_ref from some Python string functions
[deliverable/binutils-gdb.git] / gdb / symfile.c
index 0767562d5ca6f60b36f18a33c52cfd0bec73094f..8ab6a25de7c376249778d42a6fcd666a09910a02 100644 (file)
@@ -989,7 +989,7 @@ syms_from_objfile_1 (struct objfile *objfile,
      initial symbol reading for this file.  */
 
   (*objfile->sf->sym_init) (objfile);
-  clear_complaints (1);
+  clear_complaints ();
 
   (*objfile->sf->sym_offsets) (objfile, *addrs);
 
@@ -1036,7 +1036,7 @@ finish_new_objfile (struct objfile *objfile, symfile_add_flags add_flags)
     }
 
   /* We're done reading the symbol file; finish off complaints.  */
-  clear_complaints (0);
+  clear_complaints ();
 }
 
 /* Process a symbol file, as either the main file or as a dynamically
@@ -1110,11 +1110,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
       if (deprecated_pre_add_symbol_hook)
        deprecated_pre_add_symbol_hook (name);
       else
-       {
-         printf_filtered (_("Reading symbols from %s..."), name);
-         wrap_here ("");
-         gdb_flush (gdb_stdout);
-       }
+       printf_filtered (_("Reading symbols from %s...\n"), name);
     }
   syms_from_objfile (objfile, addrs, add_flags);
 
@@ -1126,29 +1122,24 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
   if ((flags & OBJF_READNOW))
     {
       if (should_print)
-       {
-         printf_filtered (_("expanding to full symbols..."));
-         wrap_here ("");
-         gdb_flush (gdb_stdout);
-       }
+       printf_filtered (_("Expanding full symbols from %s...\n"), name);
 
       if (objfile->sf)
        objfile->sf->qf->expand_all_symtabs (objfile);
     }
 
-  if (should_print && !objfile_has_symbols (objfile))
-    {
-      wrap_here ("");
-      printf_filtered (_("(no debugging symbols found)..."));
-      wrap_here ("");
-    }
+  /* Note that we only print a message if we have no symbols and have
+     no separate debug file.  If there is a separate debug file which
+     does not have symbols, we'll have emitted this message for that
+     file, and so printing it twice is just redundant.  */
+  if (should_print && !objfile_has_symbols (objfile)
+      && objfile->separate_debug_objfile == nullptr)
+    printf_filtered (_("(No debugging symbols found in %s)\n"), name);
 
   if (should_print)
     {
       if (deprecated_post_add_symbol_hook)
        deprecated_post_add_symbol_hook ();
-      else
-       printf_filtered (_("done.\n"));
     }
 
   /* We print some messages regardless of whether 'from_tty ||
@@ -2506,6 +2497,7 @@ reread_symbols (void)
          objfile->psymtabs_addrmap = NULL;
          objfile->free_psymtabs = NULL;
          objfile->template_symbols = NULL;
+         objfile->static_links = NULL;
 
          /* obstack_init also initializes the obstack so it is
             empty.  We could use obstack_specify_allocation but
@@ -2549,7 +2541,7 @@ reread_symbols (void)
            }
 
          (*objfile->sf->sym_init) (objfile);
-         clear_complaints (1);
+         clear_complaints ();
 
          objfile->flags &= ~OBJF_PSYMTABS_READ;
 
@@ -2579,7 +2571,7 @@ reread_symbols (void)
            }
 
          /* We're done reading the symbol file; finish off complaints.  */
-         clear_complaints (0);
+         clear_complaints ();
 
          /* Getting new symbols may change our opinion about what is
             frameless.  */
This page took 0.025303 seconds and 4 git commands to generate.