-/* Copyright (C) 2013 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2014 Free Software Foundation, Inc.
This file is part of GDB.
return NULL;
}
+ /* Override the returned bfd's name with our synthetic name in order
+ to allow commands listing all shared libraries to display that
+ synthetic name. Otherwise, we would only be displaying the name
+ of the archive member object. */
+ xfree (bfd_get_filename (object_bfd));
+ object_bfd->filename = xstrdup (pathname);
+
gdb_bfd_unref (archive_bfd);
do_cleanups (cleanup);
return object_bfd;
if (data_osect == NULL)
error (_("unable to find TOC entry for pc %s "
"(%s has no data section)"),
- core_addr_to_string (pc), pc_osect->objfile->name);
+ core_addr_to_string (pc), objfile_name (pc_osect->objfile));
result = (obj_section_addr (data_osect)
+ xcoff_get_toc_offset (pc_osect->objfile));