X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsolib-pa64.c;h=099e1e7e5863bddadf1e43e22b106ca956e59260;hb=40c1a0073715c1e3f93afc83edac8396eb362a98;hp=a9493e440b22bb5cdc4e3354c3e34481c9c14789;hpb=cb457ae2842770922180ce15b4885ff7b224bf95;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c index a9493e440b..099e1e7e58 100644 --- a/gdb/solib-pa64.c +++ b/gdb/solib-pa64.c @@ -1,7 +1,6 @@ /* Handle PA64 shared libraries for GDB, the GNU Debugger. - Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright (C) 2004-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -38,6 +37,7 @@ #include "target.h" #include "inferior.h" #include "regcache.h" +#include "gdb_bfd.h" #include "hppa-tdep.h" #include "solist.h" @@ -298,7 +298,6 @@ pa64_solib_create_inferior_hook (int from_tty) struct minimal_symbol *msymbol; unsigned int dld_flags, status; asection *shlib_info, *interp_sect; - char buf[4]; struct objfile *objfile; CORE_ADDR anaddr; @@ -363,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_open (buf, gnutarget, -1); if (tmp_bfd == NULL) return; @@ -372,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; } @@ -384,14 +383,14 @@ 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. */ { struct breakpoint *b - = create_solib_event_breakpoint (target_gdbarch, sym_addr); + = create_solib_event_breakpoint (target_gdbarch (), sym_addr); /* The breakpoint is actually hard-coded into the dynamic linker, so we don't need to actually insert a breakpoint instruction @@ -402,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); } } @@ -488,7 +487,6 @@ static int pa64_open_symbol_file_object (void *from_ttyp) { int from_tty = *(int *)from_ttyp; - char buf[4]; struct load_module_desc dll_desc; char *dll_path;