Fix base class function call
[binutils-gdb.git] / gdb / xcoffread.c
index 66d6b9adf9d8dff2952851525b7aa645b9c7c40f..b7da3f944c788a51585c3b3abab09e8b03a7040f 100644 (file)
@@ -1817,39 +1817,12 @@ find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo)
 }
 \f
 static void
-xcoff_psymtab_to_symtab_1 (struct objfile *objfile, legacy_psymtab *pst)
+xcoff_psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
 {
-  int i;
-
-  if (!pst)
-    return;
-
-  if (pst->readin)
-    {
-      fprintf_unfiltered
-       (gdb_stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
-        pst->filename);
-      return;
-    }
+  gdb_assert (!pst->readin);
 
   /* Read in all partial symtabs on which this one is dependent.  */
-  for (i = 0; i < pst->number_of_dependencies; i++)
-    if (!pst->dependencies[i]->readin)
-      {
-       /* Inform about additional files that need to be read in.  */
-       if (info_verbose)
-         {
-           fputs_filtered (" ", gdb_stdout);
-           wrap_here ("");
-           fputs_filtered ("and ", gdb_stdout);
-           wrap_here ("");
-           printf_filtered ("%s...", pst->dependencies[i]->filename);
-           wrap_here ("");     /* Flush output */
-           gdb_flush (gdb_stdout);
-         }
-       xcoff_psymtab_to_symtab_1 (objfile,
-                                  (legacy_psymtab *) pst->dependencies[i]);
-      }
+  pst->read_dependencies (objfile);
 
   if (((struct symloc *) pst->read_symtab_private)->numsyms != 0)
     {
@@ -1876,7 +1849,7 @@ xcoff_read_symtab (legacy_psymtab *self, struct objfile *objfile)
     {
       next_symbol_text_func = xcoff_next_symbol_text;
 
-      xcoff_psymtab_to_symtab_1 (objfile, self);
+      self->expand_psymtab (objfile);
 
       /* Match with global symbols.  This only needs to be done once,
          after all of the symtabs and dependencies have been read in.   */
@@ -1997,6 +1970,7 @@ xcoff_start_psymtab (struct objfile *objfile,
     XOBNEW (&objfile->objfile_obstack, struct symloc);
   ((struct symloc *) result->read_symtab_private)->first_symnum = first_symnum;
   result->legacy_read_symtab = xcoff_read_symtab;
+  result->legacy_expand_psymtab = xcoff_psymtab_to_symtab_1;
 
   /* Deduce the source language from the filename for this psymtab.  */
   psymtab_language = deduce_language_from_filename (filename);
@@ -2059,6 +2033,7 @@ xcoff_end_psymtab (struct objfile *objfile, legacy_psymtab *pst,
       subpst->number_of_dependencies = 1;
 
       subpst->legacy_read_symtab = pst->legacy_read_symtab;
+      subpst->legacy_expand_psymtab = pst->legacy_expand_psymtab;
     }
 
   if (num_includes == 0