aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-23 14:56:11 +0000
committerTom Tromey <tromey@redhat.com>2012-07-23 14:56:11 +0000
commit520b0001c16bc59223bec1369d056787c1883f10 (patch)
tree350d92b68574f3dd5d803fdf55ef3524b6c45d80 /gdb/rs6000-nat.c
parentd86492f2b7aea326a948476f13477bef5d4ceac9 (diff)
downloadgdb-520b0001c16bc59223bec1369d056787c1883f10.zip
gdb-520b0001c16bc59223bec1369d056787c1883f10.tar.gz
gdb-520b0001c16bc59223bec1369d056787c1883f10.tar.bz2
* bfd-target.c (target_bfd_reopen): Update.
* cli/cli-dump.c (bfd_openr_with_cleanup) (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * exec.c (exec_file_attach): Update. * gcore.c (create_gcore_bfd): Update. * gdb_bfd.c (gdb_bfd_ref): Return void. (gdb_bfd_open): Update. * gdb_bfd.h (gdb_bfd_ref): Return void. Update comments. * jit.c (jit_bfd_try_read_symtab): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * machoread.c (macho_symfile_read_all_oso): Update. (macho_check_dsym): Update. * procfs.c (insert_dbx_link_bpt_in_file): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec, pmon_load_fast): Update. * rs6000-nat.c (add_vmap): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. * solib-pa64.c (pa64_solib_create_inferior_hook): Update. * solib-spu.c (spu_bfd_open): Update. * solib.c (solib_bfd_fopen, solib_read_symbols): Update. * spu-linux-nat.c (spu_bfd_open): Update. * symfile.c (bfd_open_maybe_remote, symfile_bfd_open) (generic_load): Update. * windows-nat.c (windows_make_so): Update.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 017e997..073f167 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -751,7 +751,7 @@ add_vmap (LdInfo *ldi)
abfd = bfd_openr (filename, gnutarget);
else
abfd = bfd_fdopenr (filename, gnutarget, fd);
- abfd = gdb_bfd_ref (abfd);
+ gdb_bfd_ref (abfd);
if (!abfd)
{
warning (_("Could not open `%s' as an executable file: %s"),
@@ -769,9 +769,12 @@ add_vmap (LdInfo *ldi)
{
last = 0;
/* FIXME??? am I tossing BFDs? bfd? */
- while ((last = gdb_bfd_ref (bfd_openr_next_archived_file (abfd, last))))
- if (strcmp (mem, last->filename) == 0)
- break;
+ while ((last = bfd_openr_next_archived_file (abfd, last)))
+ {
+ gdb_bfd_ref (last);
+ if (strcmp (mem, last->filename) == 0)
+ break;
+ }
if (!last)
{
@@ -798,7 +801,8 @@ add_vmap (LdInfo *ldi)
gdb_bfd_unref (abfd);
return NULL;
}
- obj = allocate_objfile (gdb_bfd_ref (vp->bfd), 0);
+ gdb_bfd_ref (vp->bfd);
+ obj = allocate_objfile (vp->bfd, 0);
vp->objfile = obj;
/* Always add symbols for the main objfile. */