aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-07-17 17:08:23 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-07-17 17:08:23 +0000
commit831a0c44472cd3c9933a6e0d2d55d4c9d68f0645 (patch)
tree29ced86dc89b7f176fae350095fac5b47f5ce6f8 /gdb/solib.c
parent328d0145afe575320c431e1fe2ef5f9de8bf2071 (diff)
downloadgdb-831a0c44472cd3c9933a6e0d2d55d4c9d68f0645.zip
gdb-831a0c44472cd3c9933a6e0d2d55d4c9d68f0645.tar.gz
gdb-831a0c44472cd3c9933a6e0d2d55d4c9d68f0645.tar.bz2
* solib.c (solib_bfd_open): Do not call ops->bfd_open.
(solib_map_sections): Call ops->bfd_open instead of solib_bfd_open. * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member. * solib-irix.c (_initialize_irix_solib): Likewise. * solib-null.c (_initialize_null_solib): Likewise. * solib-osf.c (_initialize_osf_solib): Likewise. * solib-pa64.c (_initialize_pa64_solib): Likewise. * solib-som.c (_initialize_som_solib): Likewise. * solib-sunos.c (_initialize_sunos_solib): Likewise. * solib-svr4.c (_initialize_svr4_solib): Likewise. * solib-target.c (_initialize_solib_target): Likewise.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index 53d5d1b..157aaba 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -285,16 +285,11 @@ solib_bfd_fopen (char *pathname, int fd)
bfd *
solib_bfd_open (char *pathname)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
char *found_pathname;
int found_file;
bfd *abfd;
const struct bfd_arch_info *b;
- /* Use target-specific override if present. */
- if (ops->bfd_open)
- return ops->bfd_open (pathname);
-
/* Search for shared library file. */
found_pathname = solib_find (pathname, &found_file);
if (found_pathname == NULL)
@@ -354,6 +349,7 @@ static int
solib_map_sections (void *arg)
{
struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
+ struct target_so_ops *ops = solib_ops (target_gdbarch);
char *filename;
struct target_section *p;
struct cleanup *old_chain;
@@ -361,7 +357,7 @@ solib_map_sections (void *arg)
filename = tilde_expand (so->so_name);
old_chain = make_cleanup (xfree, filename);
- abfd = solib_bfd_open (filename);
+ abfd = ops->bfd_open (filename);
do_cleanups (old_chain);
/* Leave bfd open, core_xfer_memory and "info files" need it. */
@@ -381,8 +377,6 @@ solib_map_sections (void *arg)
for (p = so->sections; p < so->sections_end; p++)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
-
/* Relocate the section binding addresses as recorded in the shared
object's file by the base address to which the object was actually
mapped. */