Code cleanup: Add objfile_name accessor
[deliverable/binutils-gdb.git] / gdb / machoread.c
index b56e21c5418b27c9decf78cb0d90c1516b66012d..91cc69334d417f1472e9aec409c3e7b37859dd76 100644 (file)
@@ -239,7 +239,7 @@ macho_symtab_read (struct objfile *objfile,
               /* Debugging symbols are not expected here.  */
               complaint (&symfile_complaints,
                          _("%s: Unexpected debug stab outside SO markers"),
-                         objfile->name);
+                         objfile_name (objfile));
             }
           else
             {
@@ -791,16 +791,16 @@ macho_symfile_read_all_oso (VEC (oso_el) **oso_vector_ptr,
 static bfd *
 macho_check_dsym (struct objfile *objfile)
 {
-  size_t name_len = strlen (objfile->name);
+  size_t name_len = strlen (objfile_name (objfile));
   size_t dsym_len = strlen (DSYM_SUFFIX);
-  const char *base_name = lbasename (objfile->name);
+  const char *base_name = lbasename (objfile_name (objfile));
   size_t base_len = strlen (base_name);
   char *dsym_filename = alloca (name_len + dsym_len + base_len + 1);
   bfd *dsym_bfd;
   bfd_mach_o_load_command *main_uuid;
   bfd_mach_o_load_command *dsym_uuid;
 
-  strcpy (dsym_filename, objfile->name);
+  strcpy (dsym_filename, objfile_name (objfile));
   strcpy (dsym_filename + name_len, DSYM_SUFFIX);
   strcpy (dsym_filename + name_len + dsym_len, base_name);
 
@@ -810,7 +810,7 @@ macho_check_dsym (struct objfile *objfile)
   if (bfd_mach_o_lookup_command (objfile->obfd,
                                  BFD_MACH_O_LC_UUID, &main_uuid) == 0)
     {
-      warning (_("can't find UUID in %s"), objfile->name);
+      warning (_("can't find UUID in %s"), objfile_name (objfile));
       return NULL;
     }
   dsym_bfd = gdb_bfd_openr (dsym_filename, gnutarget);
@@ -837,7 +837,8 @@ macho_check_dsym (struct objfile *objfile)
   if (memcmp (dsym_uuid->command.uuid.uuid, main_uuid->command.uuid.uuid,
               sizeof (main_uuid->command.uuid.uuid)))
     {
-      warning (_("dsym file UUID doesn't match the one in %s"), objfile->name);
+      warning (_("dsym file UUID doesn't match the one in %s"),
+              objfile_name (objfile));
       gdb_bfd_unref (dsym_bfd);
       return NULL;
     }
@@ -953,7 +954,7 @@ macho_symfile_relocate (struct objfile *objfile, asection *sectp,
 
   if (mach_o_debug_level > 0)
     printf_unfiltered (_("Relocate section '%s' of %s\n"),
-                       sectp->name, objfile->name);
+                       sectp->name, objfile_name (objfile));
 
   return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL);
 }
This page took 0.03449 seconds and 4 git commands to generate.