* corelow.c (core_open): Use bfd_fopen, not bfd_fdopenr.
authorMark Mitchell <mark@codesourcery.com>
Mon, 13 Jun 2005 18:39:11 +0000 (18:39 +0000)
committerMark Mitchell <mark@codesourcery.com>
Mon, 13 Jun 2005 18:39:11 +0000 (18:39 +0000)
* 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.

gdb/ChangeLog
gdb/corelow.c
gdb/exec.c
gdb/solib-frv.c
gdb/solib-svr4.c
gdb/solib.c
gdb/symfile.c

index 50b3b9e7d017e9e8c7b464bdc72d8bcd915006ae..6a994a3f4dc586ec800fc29cc5279f32c9eaf0a6 100644 (file)
@@ -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-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * Makefile.in (symfile.o): Add $(exec_h).
index 3e70ed4bfaeaa945cb5ac0aee9001143698b1d2f..c07b5749716661951b34b4c3235ea4148c9e4ef0 100644 (file)
@@ -316,7 +316,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);
 
index 60e3b36ae3cbc5bacc0559864d1f771222c45665..69d10bf98efc72153c54c65560a040cc5c02100f 100644 (file)
@@ -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"),
index 4647b955c5e18101dd21c57bd396f111882d7864..48be77df7e2d4d518efe236f9beba7771da0617b 100644 (file)
@@ -648,7 +648,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)
        {
index f260ba980bf612f5f30cc323e22d881bfd0dd9c8..828ec7c316896b6ccbef4fc58b4cfe86f61423d3 100644 (file)
@@ -883,7 +883,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;
index dd885a92ed43c9928f621180eaa5cce648ba9689..19e7ff7e561d983197a176e372c3092c1836e465 100644 (file)
@@ -277,7 +277,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);
index 7bd3853bf73e52bb0970772b8b77dde66717153c..43eb28fef3e7b53f2fad34288d4a4a4a137061f3 100644 (file)
@@ -1372,7 +1372,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);
This page took 0.034675 seconds and 4 git commands to generate.