summaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-22 16:24:38 +0000
committerTom Tromey <tromey@redhat.com>2012-08-22 16:24:38 +0000
commit775f009526211c189caf7d39f6210f87264e7eff (patch)
tree27c901f1f020f09261d59a028ee8576b0f5df579 /gdb/rs6000-nat.c
parentb34e35f119e5a6ba3ad6640fd8b8488b3c3e4557 (diff)
downloadgdb-775f009526211c189caf7d39f6210f87264e7eff.tar.gz
* windows-nat.c (windows_make_so): Use gdb_bfd_open.
* symfile.c (bfd_open_maybe_remote): Use gdb_bfd_open. (symfile_bfd_open): Likewise. (generic_load): Likewise. * solib.c (solib_bfd_fopen): Use gdb_bfd_open. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_open. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_open. * rs6000-nat.c (add_vmap): Use gdb_bfd_open. * remote-mips.c (mips_load_srec): Use gdb_bfd_open. (pmon_load_fast): Likewise. * remote-m32r-sdi.c (m32r_load): Use gdb_bfd_open. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_open. * machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_open. (macho_check_dsym): Likewise. * m32r-rom.c (m32r_load): Use gdb_bfd_open. (m32r_upload_command): Likewise. * gdb_bfd.h (gdb_bfd_cache): Declare. * gdb_bfd.c (struct gdb_bfd_data): New. (gdb_bfd_cache): New global. (struct gdb_bfd_cache_search): New. (hash_bfd): New function. (eq_bfd): Likewise. (gdb_bfd_open): Likewise. (gdb_bfd_ref): Allocate a gdb_bfd_data and attach to the BFD. (gdb_bfd_unref): Remove closed BFD from cache. Update for gdb_bfd_data. * exec.c (exec_file_attach): Use gdb_bfd_open. * dsrec.c (load_srec): Use gdb_bfd_open.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 9b8efd3fdca..0ec04298d2b 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -745,12 +745,7 @@ add_vmap (LdInfo *ldi)
mem = xstrdup (mem);
fd = LDI_FD (ldi, arch64);
- if (fd < 0)
- /* Note that this opens it once for every member; a possible
- enhancement would be to only open it once for every object. */
- abfd = gdb_bfd_openr (filename, gnutarget);
- else
- abfd = gdb_bfd_fdopenr (filename, gnutarget, fd);
+ abfd = gdb_bfd_open (filename, gnutarget, fd < 0 ? -1 : fd);
if (!abfd)
{
warning (_("Could not open `%s' as an executable file: %s"),