gdbarch_bfd_arch_info (target_gdbarch));
if (!res)
{
- gdb_bfd_unref (abfd);
- make_cleanup (xfree, found_pathname);
+ make_cleanup_bfd_close (abfd);
error (_("`%s': not a shared-library: %s"),
- found_pathname, bfd_errmsg (bfd_get_error ()));
+ bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
}
-
- /* Make sure that the filename is malloc'ed. The current filename
- for fat-binaries BFDs is a name that was generated by BFD, usually
- a static string containing the name of the architecture. */
- res->filename = xstrdup (pathname);
-
return res;
}