aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-frv.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-08-26 17:30:35 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-08-26 17:30:35 +0000
commitf1838a98418d9912df59591058ca560f2de5cf14 (patch)
tree6f1a59a1733ab613b344f6d54b7100f6ea468179 /gdb/solib-frv.c
parent1cf3db46a678ced9d729572de9232fab9c00350d (diff)
downloadgdb-f1838a98418d9912df59591058ca560f2de5cf14.zip
gdb-f1838a98418d9912df59591058ca560f2de5cf14.tar.gz
gdb-f1838a98418d9912df59591058ca560f2de5cf14.tar.bz2
ChangeLog:
* remote.h (remote_filename_p, remote_bfd_open): Add prototypes. * remote.c (remote_bfd_iovec_open, remote_bfd_iovec_close, remote_bfd_iovec_pread, remote_bfd_iovec_stat, remote_filename_p, remote_bfd_open): New functions. (remote_hostio_send_command): Fail safely if remote connection is not set up. * solist.h (solib_open): Remove prototype. (solib_bfd_open): Add prototype. * solib.c: Include "remote.h". (solib_open): Remove, replace by ... (solib_bfd_open): ... this new function. Handle remote BFDs. (solib_map_sections): Replace solib_open by solib_bfd_open. * solib-frv.c: Include "exceptions.h". (enable_break2): Replace solib_open by solib_bfd_open. * solib-svr4.c: Include "exceptions.h". (enable_break): Replace solib_open by solib_bfd_open. * symfile.c: Include "remote.h". (build_id_verify): Handle remote BFDs. (separate_debug_file_exists): Use BFD to access file. Handle remote BFDs. (symfile_bfd_open): Handle remote BFDs. (reread_symbols): Handle remote BFDs. * NEWS: Mention "remote:" argument prefix to "set sysroot". doc/ChangeLog: * gdb.texinfo (Commands to Specify Files): Document "remote:" argument prefix to "set sysroot".
Diffstat (limited to 'gdb/solib-frv.c')
-rw-r--r--gdb/solib-frv.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 6b6ff15..189fbe0 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -30,6 +30,7 @@
#include "command.h"
#include "gdbcmd.h"
#include "elf/frv.h"
+#include "exceptions.h"
/* Flag which indicates whether internal debug messages should be printed. */
static int solib_frv_debug;
@@ -645,12 +646,11 @@ enable_break2 (void)
unsigned int interp_sect_size;
gdb_byte *buf;
bfd *tmp_bfd = NULL;
- int tmp_fd = -1;
- char *tmp_pathname = NULL;
int status;
CORE_ADDR addr, interp_loadmap_addr;
gdb_byte addr_buf[FRV_PTR_SIZE];
struct int_elf32_fdpic_loadmap *ldm;
+ volatile struct gdb_exception ex;
/* Read the contents of the .interp section into a local buffer;
the contents specify the dynamic linker this program uses. */
@@ -668,25 +668,16 @@ enable_break2 (void)
be trivial on GNU/Linux). Therefore, we have to try an alternate
mechanism to find the dynamic linker's base address. */
- tmp_fd = solib_open (buf, &tmp_pathname);
- if (tmp_fd >= 0)
- tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
-
+ TRY_CATCH (ex, RETURN_MASK_ALL)
+ {
+ tmp_bfd = solib_bfd_open (buf);
+ }
if (tmp_bfd == NULL)
{
enable_break_failure_warning ();
return 0;
}
- /* Make sure the dynamic linker is really a useful object. */
- if (!bfd_check_format (tmp_bfd, bfd_object))
- {
- warning (_("Unable to grok dynamic linker %s as an object file"), buf);
- enable_break_failure_warning ();
- bfd_close (tmp_bfd);
- return 0;
- }
-
status = frv_fdpic_loadmap_addresses (target_gdbarch,
&interp_loadmap_addr, 0);
if (status < 0)