Make gdb.mi/user-selected-context-sync.exp use proc_with_prefix
[deliverable/binutils-gdb.git] / gdb / machoread.c
index 45ae67b071274e2576c5ce334d6478bbbddc5daa..00f25a48117c0b9b8df91dd7d6f817d24a743586 100644 (file)
@@ -97,7 +97,8 @@ macho_register_oso (VEC (oso_el) **oso_vector_ptr,
 /* Add symbol SYM to the minimal symbol table of OBJFILE.  */
 
 static void
-macho_symtab_add_minsym (struct objfile *objfile, const asymbol *sym)
+macho_symtab_add_minsym (minimal_symbol_reader &reader,
+                        struct objfile *objfile, const asymbol *sym)
 {
   if (sym->name == NULL || *sym->name == '\0')
     {
@@ -147,10 +148,9 @@ macho_symtab_add_minsym (struct objfile *objfile, const asymbol *sym)
       else
         return;        /* Skip this symbol.  */
 
-      prim_record_minimal_symbol_and_info
-        (sym->name, symaddr, ms_type,
-        gdb_bfd_section_index (objfile->obfd, sym->section),
-        objfile);
+      reader.record_with_info (sym->name, symaddr, ms_type,
+                              gdb_bfd_section_index (objfile->obfd,
+                                                     sym->section));
     }
 }
 
@@ -158,7 +158,8 @@ macho_symtab_add_minsym (struct objfile *objfile, const asymbol *sym)
    NUMBER_OF_SYMBOLS for OBJFILE.  Registers OSO filenames found.  */
 
 static void
-macho_symtab_read (struct objfile *objfile,
+macho_symtab_read (minimal_symbol_reader &reader,
+                  struct objfile *objfile,
                   long number_of_symbols, asymbol **symbol_table,
                   VEC (oso_el) **oso_vector_ptr)
 {
@@ -227,7 +228,7 @@ macho_symtab_read (struct objfile *objfile,
           else
             {
               /* Non-debugging symbols go to the minimal symbol table.  */
-              macho_symtab_add_minsym (objfile, sym);
+              macho_symtab_add_minsym (reader, objfile, sym);
             }
           break;
 
@@ -429,7 +430,8 @@ macho_resolve_oso_sym_with_minsym (struct objfile *main_objfile, asymbol *sym)
 
 static void
 macho_add_oso_symfile (oso_el *oso, bfd *abfd, const char *name,
-                       struct objfile *main_objfile, int symfile_flags)
+                       struct objfile *main_objfile,
+                      symfile_add_flags symfile_flags)
 {
   int storage;
   int i;
@@ -631,7 +633,7 @@ macho_add_oso_symfile (oso_el *oso, bfd *abfd, const char *name,
 static void
 macho_symfile_read_all_oso (VEC (oso_el) **oso_vector_ptr,
                            struct objfile *main_objfile,
-                           int symfile_flags)
+                           symfile_add_flags symfile_flags)
 {
   int ix;
   VEC (oso_el) *vec = *oso_vector_ptr;
@@ -825,7 +827,7 @@ macho_check_dsym (struct objfile *objfile, char **filenamep)
 }
 
 static void
-macho_symfile_read (struct objfile *objfile, int symfile_flags)
+macho_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   bfd *abfd = objfile->obfd;
   long storage_needed;
@@ -855,7 +857,7 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags)
          symbol_table = (asymbol **) xmalloc (storage_needed);
          make_cleanup (xfree, symbol_table);
 
-          minimal_symbol_reader reader;
+          minimal_symbol_reader reader (objfile);
 
          symcount = bfd_canonicalize_symtab (objfile->obfd, symbol_table);
 
@@ -864,9 +866,10 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags)
                   bfd_get_filename (objfile->obfd),
                   bfd_errmsg (bfd_get_error ()));
 
-         macho_symtab_read (objfile, symcount, symbol_table, &oso_vector);
+         macho_symtab_read (reader, objfile, symcount, symbol_table,
+                            &oso_vector);
 
-          reader.install (objfile);
+          reader.install ();
        }
 
       /* Try to read .eh_frame / .debug_frame.  */
This page took 0.024625 seconds and 4 git commands to generate.