aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
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 9b8efd3..0ec0429 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"),