inf_ttrace_follow_fork: detach_breakpoints called twice for child.
[binutils-gdb.git] / gdb / solib-pa64.c
index c3a0b31c97246212174557c0ae5694f3ad38d10e..00ed8a549036a1f8c3a5344a7a38a2e5797cf4b7 100644 (file)
@@ -362,7 +362,7 @@ manpage for methods to privately map shared library text."));
         to find any magic formula to find it for Solaris (appears to
         be trivial on GNU/Linux).  Therefore, we have to try an alternate
         mechanism to find the dynamic linker's base address.  */
-      tmp_bfd = bfd_openr (buf, gnutarget);
+      tmp_bfd = gdb_bfd_openr (buf, gnutarget);
       if (tmp_bfd == NULL)
        return;
 
@@ -371,7 +371,7 @@ manpage for methods to privately map shared library text."));
        {
          warning (_("Unable to grok dynamic linker %s as an object file"),
                   buf);
-         bfd_close (tmp_bfd);
+         gdb_bfd_unref (tmp_bfd);
          return;
        }
 
@@ -383,8 +383,8 @@ manpage for methods to privately map shared library text."));
         routine.  */
       load_addr = regcache_read_pc (get_current_regcache ())
                  - tmp_bfd->start_address;
-      sym_addr = bfd_lookup_symbol_from_symtab (tmp_bfd, cmp_name,
-                                               "__dld_break");
+      sym_addr = gdb_bfd_lookup_symbol_from_symtab (tmp_bfd, cmp_name,
+                                                   "__dld_break");
       sym_addr = load_addr + sym_addr + 4;
       
       /* Create the shared library breakpoint.  */
@@ -401,7 +401,7 @@ manpage for methods to privately map shared library text."));
       }
 
       /* We're done with the temporary bfd.  */
-      bfd_close (tmp_bfd);
+      gdb_bfd_unref (tmp_bfd);
     }
 }