From 293acfae4e3c9aad417e262edc9847c79bbbbb11 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 27 Jul 2016 09:00:03 +0930 Subject: [PATCH] Wean gdb and sim off private libbfd.h header 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 | 7 +++++++ gdb/amd64-darwin-tdep.c | 1 - gdb/i386-darwin-tdep.c | 1 - gdb/rs6000-nat.c | 1 - gdb/rs6000-tdep.c | 1 - sim/aarch64/ChangeLog | 4 ++++ sim/aarch64/memory.c | 1 - sim/rl78/ChangeLog | 5 +++++ sim/rl78/load.c | 5 ++--- sim/rx/ChangeLog | 5 +++++ sim/rx/load.c | 5 ++--- 11 files changed, 25 insertions(+), 11 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a4d6258bb0c..9ad561de346 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2016-07-27 Alan Modra + + * 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 * symtab.c (register_symbol_computed_impl): Update. diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c index d6ed84f0914..b99a30b0b5b 100644 --- a/gdb/amd64-darwin-tdep.c +++ b/gdb/amd64-darwin-tdep.c @@ -26,7 +26,6 @@ #include "floatformat.h" #include "symtab.h" #include "regcache.h" -#include "libbfd.h" #include "objfiles.h" #include "i387-tdep.h" diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c index 6661fb134d9..e0090ef0ab0 100644 --- a/gdb/i386-darwin-tdep.c +++ b/gdb/i386-darwin-tdep.c @@ -26,7 +26,6 @@ #include "floatformat.h" #include "symtab.h" #include "regcache.h" -#include "libbfd.h" #include "objfiles.h" #include "i387-tdep.h" diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 1ae3cc328a1..f99846052e9 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -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" diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 1ed1354f2d6..a616cbe9c2c 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -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" diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index d0d5f4c7a5c..78015efdc09 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2016-07-27 Alan Modra + + * memory.c: Don't include libbfd.h. + 2016-07-21 Nick Clifton * simulator.c (fsqrts): Use sqrtf rather than sqrt. diff --git a/sim/aarch64/memory.c b/sim/aarch64/memory.c index 50f48371868..94c549fa0ad 100644 --- a/sim/aarch64/memory.c +++ b/sim/aarch64/memory.c @@ -26,7 +26,6 @@ #include #include "bfd.h" -#include "libbfd.h" #include "libiberty.h" #include "elf/internal.h" #include "elf/common.h" diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index eff58a2c685..fd3362728a6 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,8 @@ +2016-07-27 Alan Modra + + * load.c: Don't include libbfd.h. + (rl78_load): Don't use private iovec seek or read. + 2016-01-10 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/rl78/load.c b/sim/rl78/load.c index 36dee7306c8..d3e0379236e 100644 --- a/sim/rl78/load.c +++ b/sim/rl78/load.c @@ -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; diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 104578cf361..39de491df9f 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2016-07-27 Alan Modra + + * load.c: Don't include libbfd.h. + (rx_load): Don't use private iovec seek or read. + 2016-04-27 Nick Clifton PR target/20000 diff --git a/sim/rx/load.c b/sim/rx/load.c index f88feb698f5..c4cbb436896 100644 --- a/sim/rx/load.c +++ b/sim/rx/load.c @@ -25,7 +25,6 @@ along with this program. If not, see . */ #include #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; -- 2.39.2