aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-06-13 18:43:57 +0000
committerMark Mitchell <mark@codesourcery.com>2005-06-13 18:43:57 +0000
commitab74cba4ae0bd31e885cb197de43ae5dc54b5e4a (patch)
treeb61c8b54503a94dac9c0df2704e3aef65cef1ae1
parent6bd2c2c435217d4de9b7b64ce419fb6a2caa9dd5 (diff)
downloadgdb-ab74cba4ae0bd31e885cb197de43ae5dc54b5e4a.zip
gdb-ab74cba4ae0bd31e885cb197de43ae5dc54b5e4a.tar.gz
gdb-ab74cba4ae0bd31e885cb197de43ae5dc54b5e4a.tar.bz2
* corelow.c (core_open): Use bfd_fopen, not bfd_fdopenr.
* exec.c (exec_file_attach): Likewise. * solib-frv.c (enable_break2): Likewise. * solib-svr4.c (enable_break): Likewise. * solib.c (solib_map_sections): Likewise. * symfile.c (symfile_bfd_open): Likewise.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/corelow.c4
-rw-r--r--gdb/exec.c4
-rw-r--r--gdb/solib-frv.c2
-rw-r--r--gdb/solib-svr4.c2
-rw-r--r--gdb/solib.c2
-rw-r--r--gdb/symfile.c2
7 files changed, 19 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 03d5115..3c84e6c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2005-06-13 Mark Mitchell <mark@codesourcery.com>
+
+ * corelow.c (core_open): Use bfd_fopen, not bfd_fdopenr.
+ * exec.c (exec_file_attach): Likewise.
+ * solib-frv.c (enable_break2): Likewise.
+ * solib-svr4.c (enable_break): Likewise.
+ * solib.c (solib_map_sections): Likewise.
+ * symfile.c (symfile_bfd_open): Likewise.
+
2005-03-25 Mark Kettenis <kettenis@gnu.org>
* dwarf2-frame.h: Update copyrigh year.
diff --git a/gdb/corelow.c b/gdb/corelow.c
index a78f71a..4d2e5dd 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -315,7 +315,9 @@ core_open (char *filename, int from_tty)
if (scratch_chan < 0)
perror_with_name (filename);
- temp_bfd = bfd_fdopenr (filename, gnutarget, scratch_chan);
+ temp_bfd = bfd_fopen (filename, gnutarget,
+ write_files ? FOPEN_RUB : FOPEN_RB,
+ scratch_chan);
if (temp_bfd == NULL)
perror_with_name (filename);
diff --git a/gdb/exec.c b/gdb/exec.c
index 6bf524a..00f0e72 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -214,7 +214,9 @@ exec_file_attach (char *filename, int from_tty)
#endif
if (scratch_chan < 0)
perror_with_name (filename);
- exec_bfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
+ exec_bfd = bfd_fopen (scratch_pathname, gnutarget,
+ write_files ? FOPEN_RUB : FOPEN_RB,
+ scratch_chan);
if (!exec_bfd)
error (_("\"%s\": could not open as an executable file: %s"),
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 3fb5424..d6a7035 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -638,7 +638,7 @@ enable_break2 (void)
tmp_fd = solib_open (buf, &tmp_pathname);
if (tmp_fd >= 0)
- tmp_bfd = bfd_fdopenr (tmp_pathname, gnutarget, tmp_fd);
+ tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
if (tmp_bfd == NULL)
{
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 6106d9e..6692c95 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -893,7 +893,7 @@ enable_break (void)
tmp_fd = solib_open (buf, &tmp_pathname);
if (tmp_fd >= 0)
- tmp_bfd = bfd_fdopenr (tmp_pathname, gnutarget, tmp_fd);
+ tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
if (tmp_bfd == NULL)
goto bkpt_at_symbol;
diff --git a/gdb/solib.c b/gdb/solib.c
index dd5af4d..ef89db2 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -253,7 +253,7 @@ solib_map_sections (void *arg)
}
/* Leave scratch_pathname allocated. abfd->name will point to it. */
- abfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
+ abfd = bfd_fopen (scratch_pathname, gnutarget, FOPEN_RB, scratch_chan);
if (!abfd)
{
close (scratch_chan);
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 15d577e..6bf7b2a 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1284,7 +1284,7 @@ symfile_bfd_open (char *name)
name = absolute_name; /* Keep 2nd malloc'd copy in bfd */
/* It'll be freed in free_objfile(). */
- sym_bfd = bfd_fdopenr (name, gnutarget, desc);
+ sym_bfd = bfd_fopen (name, gnutarget, FOPEN_RB, desc);
if (!sym_bfd)
{
close (desc);