Wean gdb and sim off private libbfd.h header
authorAlan Modra <amodra@gmail.com>
Tue, 26 Jul 2016 23:30:03 +0000 (09:00 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 26 Jul 2016 23:31:45 +0000 (09:01 +0930)
The major reason this header was needed, bfd_default_set_arch_mach,
has now moved to bfd.h.

gdb/
* amd64-darwin-tdep.c: Don't include libbfd.h.
* i386-darwin-tdep.c: Likewise.
* rs6000-nat.c: Likewise.
* rs6000-tdep.c: Likewise.
sim/aarch64/
* memory.c: Don't include libbfd.h.
sim/rl78/
* load.c: Don't include libbfd.h.
(rl78_load): Don't use private iovec seek or read.
sim/rx/
* load.c: Don't include libbfd.h.
(rx_load): Don't use private iovec seek or read.

gdb/ChangeLog
gdb/amd64-darwin-tdep.c
gdb/i386-darwin-tdep.c
gdb/rs6000-nat.c
gdb/rs6000-tdep.c
sim/aarch64/ChangeLog
sim/aarch64/memory.c
sim/rl78/ChangeLog
sim/rl78/load.c
sim/rx/ChangeLog
sim/rx/load.c

index a4d6258bb0ccd58ce13d1dcd5dbfc2b42267af2c..9ad561de346e02e5410f58498a3bba2bc436088b 100644 (file)
@@ -1,3 +1,10 @@
+2016-07-27  Alan Modra  <amodra@gmail.com>
+
+       * amd64-darwin-tdep.c: Don't include libbfd.h.
+       * i386-darwin-tdep.c: Likewise.
+       * rs6000-nat.c: Likewise.
+       * rs6000-tdep.c: Likewise.
+
 2016-07-26  Tom Tromey  <tom@tromey.com>
 
        * symtab.c (register_symbol_computed_impl): Update.
index d6ed84f09145e6b6a9e68389c5cf83cecc1530c5..b99a30b0b5b6c53ff238dfcde89c51606bd69a49 100644 (file)
@@ -26,7 +26,6 @@
 #include "floatformat.h"
 #include "symtab.h"
 #include "regcache.h"
-#include "libbfd.h"
 #include "objfiles.h"
 
 #include "i387-tdep.h"
index 6661fb134d90318ba997ad341d91cd06a7ef8798..e0090ef0ab0ae987852c133f6bda67fa6e4e866f 100644 (file)
@@ -26,7 +26,6 @@
 #include "floatformat.h"
 #include "symtab.h"
 #include "regcache.h"
-#include "libbfd.h"
 #include "objfiles.h"
 
 #include "i387-tdep.h"
index 1ae3cc328a1f51f01acfd7a5a8d3301fb1d078a2..f99846052e92b37a155a77443088683bc457499c 100644 (file)
@@ -23,7 +23,6 @@
 #include "gdbcore.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "libbfd.h"            /* For bfd_default_set_arch_mach (FIXME) */
 #include "bfd.h"
 #include "gdb-stabs.h"
 #include "regcache.h"
index 1ed1354f2d605a6079f6ac1824b4160cbcf02c68..a616cbe9c2c59b8fcc4ed6d87af78f3af4017f6f 100644 (file)
@@ -43,7 +43,6 @@
 #include "record-full.h"
 #include "auxv.h"
 
-#include "libbfd.h"            /* for bfd_default_set_arch_mach */
 #include "coff/internal.h"     /* for libcoff.h */
 #include "libcoff.h"           /* for xcoff_data */
 #include "coff/xcoff.h"
index d0d5f4c7a5c13fabf9a0d9af608f4a6d43688d14..78015efdc095ccbb52786dc940319682efa6370c 100644 (file)
@@ -1,3 +1,7 @@
+2016-07-27  Alan Modra  <amodra@gmail.com>
+
+       * memory.c: Don't include libbfd.h.
+
 2016-07-21  Nick Clifton  <nickc@redhat.com>
 
        * simulator.c (fsqrts): Use sqrtf rather than sqrt.
index 50f4837186852041094b5d9ccd9da1dc8bd683e5..94c549fa0ad3803a393a75675627a5c44e459226 100644 (file)
@@ -26,7 +26,6 @@
 #include <string.h>
 
 #include "bfd.h"
-#include "libbfd.h"
 #include "libiberty.h"
 #include "elf/internal.h"
 #include "elf/common.h"
index eff58a2c68542d1c01cd3b1eb14d1f01908ef67a..fd3362728a6b6cb8088f712cc376496b5a6bf377 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-27  Alan Modra  <amodra@gmail.com>
+
+       * load.c: Don't include libbfd.h.
+       (rl78_load): Don't use private iovec seek or read.
+
 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
 
        * config.in, configure: Regenerate.
index 36dee7306c84b8c101da19b79194a154537a54f4..d3e0379236e07c17cb6da54277609a4e30a8ed21 100644 (file)
@@ -29,7 +29,6 @@
 #include "bfd.h"
 #include "elf-bfd.h"
 #include "elf/rl78.h"
-#include "libbfd.h"
 #include "cpu.h"
 #include "mem.h"
 #include "load.h"
@@ -140,13 +139,13 @@ rl78_load (bfd *prog, host_callback *callbacks, const char * const simname)
       buf = xmalloc (size);
 
       offset = p->p_offset;
-      if (prog->iovec->bseek (prog, offset, SEEK_SET) != 0)
+      if (bfd_seek (prog, offset, SEEK_SET) != 0)
        {
          fprintf (stderr, "%s, Failed to seek to offset %lx\n", simname, (long) offset);
          continue;
        }
 
-      if (prog->iovec->bread (prog, buf, size) != size)
+      if (bfd_bread (buf, size, prog) != size)
        {
          fprintf (stderr, "%s: Failed to read %lx bytes\n", simname, size);
          continue;
index 104578cf3615f31204cccf060d20340c7859ab9f..39de491df9f891d7d1b27a33fefb1716d6a0ccd0 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-27  Alan Modra  <amodra@gmail.com>
+
+       * load.c: Don't include libbfd.h.
+       (rx_load): Don't use private iovec seek or read.
+
 2016-04-27  Nick Clifton  <nickc@redhat.com>
 
        PR target/20000
index f88feb698f537cdb8fc5da838225a60ef58f7495..c4cbb436896ec5038aaf1a8f41e694b608f3ecdb 100644 (file)
@@ -25,7 +25,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <string.h>
 
 #include "bfd.h"
-#include "libbfd.h"
 #include "cpu.h"
 #include "mem.h"
 #include "load.h"
@@ -146,12 +145,12 @@ rx_load (bfd *prog, host_callback *callback)
        }
       
       offset = p->p_offset;
-      if (prog->iovec->bseek (prog, offset, SEEK_SET) != 0)
+      if (bfd_seek (prog, offset, SEEK_SET) != 0)
        {
          fprintf (stderr, "Failed to seek to offset %lx\n", (long) offset);
          continue;
        }
-      if (prog->iovec->bread (prog, buf, size) != size)
+      if (bfd_bread (buf, size, prog) != size)
        {
          fprintf (stderr, "Failed to read %lx bytes\n", size);
          continue;