gdb_bfd_ref (abfd);
if (abfd != NULL)
{
- objfile->name = bfd_get_filename (abfd);
+ objfile->original_name = bfd_get_filename (abfd);
objfile->mtime = bfd_get_mtime (abfd);
/* Build section table. */
}
else
{
- objfile->name = "<<anonymous objfile>>";
+ objfile->original_name = "<<anonymous objfile>>";
}
objfile->per_bfd = get_objfile_bfd_data (objfile, abfd);
" (A) section `%s' from `%s' [%s, %s)\n"
" (B) section `%s' from `%s' [%s, %s).\n"
"Will ignore section B"),
- bfd_section_name (abfd1, bfds1), objf1->name,
+ bfd_section_name (abfd1, bfds1), objfile_name (objf1),
paddress (gdbarch, sect1_addr),
paddress (gdbarch, sect1_endaddr),
- bfd_section_name (abfd2, bfds2), objf2->name,
+ bfd_section_name (abfd2, bfds2), objfile_name (objf2),
paddress (gdbarch, sect2_addr),
paddress (gdbarch, sect2_endaddr));
}
}
}
+/* Return canonical name for OBJFILE. */
+
+const char *
+objfile_name (const struct objfile *objfile)
+{
+ return objfile->original_name;
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_objfiles;