Code cleanup: Add objfile_name accessor
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 7ade38c92eb74e868ae947b2051c671b7e8da624..1008f6d777e37792596e83cc25b7bef0d5711bf2 100644 (file)
@@ -819,7 +819,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
   /* Position to read the symbol table.  */
   val = bfd_seek (objfile->obfd, (long) symtab_offset, 0);
   if (val < 0)
-    perror_with_name (objfile->name);
+    perror_with_name (objfile_name (objfile));
 
   coffread_objfile = objfile;
   nlist_bfd_global = objfile->obfd;
@@ -1229,14 +1229,14 @@ read_one_sym (struct coff_symbol *cs,
   cs->c_symnum = symnum;
   bytes = bfd_bread (temp_sym, local_symesz, nlist_bfd_global);
   if (bytes != local_symesz)
-    error (_("%s: error reading symbols"), coffread_objfile->name);
+    error (_("%s: error reading symbols"), objfile_name (coffread_objfile));
   bfd_coff_swap_sym_in (symfile_bfd, temp_sym, (char *) sym);
   cs->c_naux = sym->n_numaux & 0xff;
   if (cs->c_naux >= 1)
     {
       bytes  = bfd_bread (temp_aux, local_auxesz, nlist_bfd_global);
       if (bytes != local_auxesz)
-       error (_("%s: error reading symbols"), coffread_objfile->name);
+       error (_("%s: error reading symbols"), objfile_name (coffread_objfile));
       bfd_coff_swap_aux_in (symfile_bfd, temp_aux,
                            sym->n_type, sym->n_sclass,
                            0, cs->c_naux, (char *) aux);
@@ -1246,7 +1246,8 @@ read_one_sym (struct coff_symbol *cs,
        {
          bytes = bfd_bread (temp_aux, local_auxesz, nlist_bfd_global);
          if (bytes != local_auxesz)
-           error (_("%s: error reading symbols"), coffread_objfile->name);
+           error (_("%s: error reading symbols"),
+                  objfile_name (coffread_objfile));
        }
     }
   cs->c_name = getsymname (sym);
This page took 0.024978 seconds and 4 git commands to generate.