aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-11-21 01:09:54 +0000
committerMichael Snyder <msnyder@vmware.com>2000-11-21 01:09:54 +0000
commite4f7b8c818485e2f02fa7f7e0255973b062eeeda (patch)
tree56894cad1a74ef224d913413eb45a162052ed76e /gdb/solib-svr4.c
parent22c720812e398d45e1529caf3e7486c933c5084e (diff)
downloadgdb-e4f7b8c818485e2f02fa7f7e0255973b062eeeda.zip
gdb-e4f7b8c818485e2f02fa7f7e0255973b062eeeda.tar.gz
gdb-e4f7b8c818485e2f02fa7f7e0255973b062eeeda.tar.bz2
2000-11-20 Michael Snyder <msnyder@cleaver.cygnus.com>
* solist.h: Declare new function solib_open. * solib.c (solib_open): New function. Abstracts some of the code from solib_map_sections, for finding the binary solib file. (solib_map_sections): Call solib_open. * solib-svr4.c (enable_break): Call solib_open.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index bbe90a6..f7c7a78 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -287,7 +287,6 @@ IGNORE_FIRST_LINK_MAP_ENTRY (struct so_list *so)
#endif /* !SVR4_SHARED_LIBS */
-
static CORE_ADDR debug_base; /* Base of dynamic linker structures */
static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
@@ -295,16 +294,6 @@ static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
static int match_main (char *);
-/* If non-zero, this is a prefix that will be added to the front of the name
- shared libraries with an absolute filename for loading. */
-static char *solib_absolute_prefix = NULL;
-
-/* If non-empty, this is a search path for loading non-absolute shared library
- symbol files. This takes precedence over the environment variables PATH
- and LD_LIBRARY_PATH. */
-static char *solib_search_path = NULL;
-
-
#ifndef SVR4_SHARED_LIBS
/* Allocate the runtime common object file. */
@@ -1269,7 +1258,9 @@ enable_break (void)
unsigned int interp_sect_size;
char *buf;
CORE_ADDR load_addr;
- bfd *tmp_bfd;
+ bfd *tmp_bfd = NULL;
+ int tmp_fd = -1;
+ char *tmp_pathname = NULL;
CORE_ADDR sym_addr = 0;
/* Read the contents of the .interp section into a local buffer;
@@ -1287,7 +1278,11 @@ enable_break (void)
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_fd = solib_open (buf, &tmp_pathname);
+ if (tmp_fd >= 0)
+ tmp_bfd = bfd_fdopenr (tmp_pathname, gnutarget, tmp_fd);
+
if (tmp_bfd == NULL)
goto bkpt_at_symbol;