* objfiles.h (struct objfile): New GDBARCH member.
[deliverable/binutils-gdb.git] / gdb / xcoffread.c
index 5f128fc4173adb3afef863d8a0c42e09f29fe618..dead40c18188c5e0c31a999aeb127054e929c02a 100644 (file)
@@ -1435,6 +1435,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
 static struct symbol *
 process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
 {
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
   struct symbol onesymbol;
   struct symbol *sym = &onesymbol;
   struct symbol *sym2 = NULL;
@@ -1474,7 +1475,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
          patch_block_stabs (), unless the file was compiled without -g.  */
 
       DEPRECATED_SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
-      SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_text_symbol;
+      SYMBOL_TYPE (sym) = builtin_type (gdbarch)->nodebug_text_symbol;
 
       SYMBOL_CLASS (sym) = LOC_BLOCK;
       SYMBOL_DUP (sym, sym2);
@@ -1487,7 +1488,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
   else
     {
       /* In case we can't figure out the type, provide default. */
-      SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_data_symbol;
+      SYMBOL_TYPE (sym) = builtin_type (gdbarch)->nodebug_data_symbol;
 
       switch (cs->c_sclass)
        {
@@ -2582,9 +2583,9 @@ scan_xcoff_symtab (struct objfile *objfile)
              case 'S':
                symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
 
-               if (gdbarch_static_transform_name_p (current_gdbarch))
+               if (gdbarch_static_transform_name_p (gdbarch))
                  namestring = gdbarch_static_transform_name
-                                (current_gdbarch, namestring);
+                                (gdbarch, namestring);
 
                add_psymbol_to_list (namestring, p - namestring,
                                     VAR_DOMAIN, LOC_STATIC,
This page took 0.024029 seconds and 4 git commands to generate.