From: Ulrich Weigand Date: Thu, 5 Oct 2017 17:12:45 +0000 (+0200) Subject: Clean up includes of doublest.h and floatformat.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1841ee5d0300cf00022c8aadfe16725c5e86fe1d;p=binutils-gdb.git Clean up includes of doublest.h and floatformat.h As a first small step to getting rid of doublest.h, this patch removes the include of "floatformat.h" in "doublest.h". This is actually not needed for the file itself. A few source files now need to include "floatformat.h" directly, since they got it indirectly via "doublest.h" and still need it. In reviewing which files need it, I found a number of files that include "floatformat.h" directly without actually needing it at all. Similarly, a number of files include "doublest.h" without needing it. I've also removed those unnecessary include statements. gdb/ChangeLog: 2017-10-05 Ulrich Weigand * doublest.h: Do not include "floatformat.h". Remove stale comments. * gdbtypes.c: Include "floatformat.h". * value.c: Likewise. * m68k-tdep.c: Likewise. * findvar.c: Do not include "floatformat.h". * amd64-darwin-tdep.c: Likewise. * arm-linux-tdep.c: Likewise. * i386-darwin-tdep.c: Likewise. * i387-tdep.c: Likewise. * m68k-linux-tdep.c: Likewise. * mep-tdep.c: Likewise. * mips-tdep.c: Likewise. * nios2-tdep.c: Likewise. * s390-linux-tdep.c: Likewise. * sparc-obsd-tdep.c: Likewise. * sparc-tdep.c: Likewise. * sparc64-tdep.c: Likewise. * spu-tdep.c: Likewise. * tic6x-tdep.c: Likewise. * tilegx-tdep.c: Likewise. * vax-tdep.c: Likewise. * xstormy16-tdep.c: Likewise. * xtensa-tdep.c: Likewise. * top.c: Do not include "doublest.h". * aarch64-tdep.c: Likewise. * alpha-tdep.c: Likewise. * arm-linux-tdep.c: Likewise. * m68k-linux-tdep.c: Likewise. * tilegx-tdep.c: Likewise. * xstormy16-tdep.c: Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 024664f0415..5439ffb2844 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,38 @@ +2017-10-05 Ulrich Weigand + + * doublest.h: Do not include "floatformat.h". Remove stale comments. + * gdbtypes.c: Include "floatformat.h". + * value.c: Likewise. + * m68k-tdep.c: Likewise. + + * findvar.c: Do not include "floatformat.h". + * amd64-darwin-tdep.c: Likewise. + * arm-linux-tdep.c: Likewise. + * i386-darwin-tdep.c: Likewise. + * i387-tdep.c: Likewise. + * m68k-linux-tdep.c: Likewise. + * mep-tdep.c: Likewise. + * mips-tdep.c: Likewise. + * nios2-tdep.c: Likewise. + * s390-linux-tdep.c: Likewise. + * sparc-obsd-tdep.c: Likewise. + * sparc-tdep.c: Likewise. + * sparc64-tdep.c: Likewise. + * spu-tdep.c: Likewise. + * tic6x-tdep.c: Likewise. + * tilegx-tdep.c: Likewise. + * vax-tdep.c: Likewise. + * xstormy16-tdep.c: Likewise. + * xtensa-tdep.c: Likewise. + + * top.c: Do not include "doublest.h". + * aarch64-tdep.c: Likewise. + * alpha-tdep.c: Likewise. + * arm-linux-tdep.c: Likewise. + * m68k-linux-tdep.c: Likewise. + * tilegx-tdep.c: Likewise. + * xstormy16-tdep.c: Likewise. + 2017-10-05 John Baldwin * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define. diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index da5731e783b..e74b7cd3705 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -27,7 +27,6 @@ #include "dis-asm.h" #include "regcache.h" #include "reggroups.h" -#include "doublest.h" #include "value.h" #include "arch-utils.h" #include "osabi.h" diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index e66517d21cd..89556956aba 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -18,7 +18,6 @@ along with this program. If not, see . */ #include "defs.h" -#include "doublest.h" #include "frame.h" #include "frame-unwind.h" #include "frame-base.h" diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c index 7f6cb94ad64..384d20944b7 100644 --- a/gdb/amd64-darwin-tdep.c +++ b/gdb/amd64-darwin-tdep.c @@ -23,7 +23,6 @@ #include "inferior.h" #include "gdbcore.h" #include "target.h" -#include "floatformat.h" #include "symtab.h" #include "regcache.h" #include "objfiles.h" diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 72b91d4f2e2..056c1b94212 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -21,11 +21,9 @@ #include "target.h" #include "value.h" #include "gdbtypes.h" -#include "floatformat.h" #include "gdbcore.h" #include "frame.h" #include "regcache.h" -#include "doublest.h" #include "solib-svr4.h" #include "osabi.h" #include "regset.h" diff --git a/gdb/doublest.h b/gdb/doublest.h index a22baef89ed..74d05729120 100644 --- a/gdb/doublest.h +++ b/gdb/doublest.h @@ -23,18 +23,6 @@ struct type; struct floatformat; -/* Setup definitions for host and target floating point formats. We need to - consider the format for `float', `double', and `long double' for both target - and host. We need to do this so that we know what kind of conversions need - to be done when converting target numbers to and from the hosts DOUBLEST - data type. */ - -/* This is used to indicate that we don't know the format of the floating point - number. Typically, this is useful for native ports, where the actual format - is irrelevant, since no conversions will be taking place. */ - -#include "floatformat.h" /* For struct floatformat */ - /* Use `long double' if the host compiler supports it. (Note that this is not necessarily any longer than `double'. On SunOS/gcc, it's the same as double.) This is necessary because GDB internally converts all floating diff --git a/gdb/findvar.c b/gdb/findvar.c index b3fb337f772..2bc2095bf7b 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -25,7 +25,6 @@ #include "gdbcore.h" #include "inferior.h" #include "target.h" -#include "floatformat.h" #include "symfile.h" /* for overlay functions */ #include "regcache.h" #include "user-regs.h" diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 57bc218d91d..73d445361dd 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -38,6 +38,7 @@ #include "bcache.h" #include "dwarf2loc.h" #include "gdbcore.h" +#include "floatformat.h" /* Initialize BADNESS constants. */ diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c index a888e10c895..c6420404324 100644 --- a/gdb/i386-darwin-tdep.c +++ b/gdb/i386-darwin-tdep.c @@ -23,7 +23,6 @@ #include "inferior.h" #include "gdbcore.h" #include "target.h" -#include "floatformat.h" #include "symtab.h" #include "regcache.h" #include "objfiles.h" diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 574914cab78..3de7c62f4a0 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -19,7 +19,6 @@ #include "defs.h" #include "doublest.h" -#include "floatformat.h" #include "frame.h" #include "gdbcore.h" #include "inferior.h" diff --git a/gdb/m68k-linux-tdep.c b/gdb/m68k-linux-tdep.c index fa0848f453a..c911f2d4aca 100644 --- a/gdb/m68k-linux-tdep.c +++ b/gdb/m68k-linux-tdep.c @@ -19,8 +19,6 @@ #include "defs.h" #include "gdbcore.h" -#include "doublest.h" -#include "floatformat.h" #include "frame.h" #include "target.h" #include "gdbtypes.h" diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index ce126a8b814..37df9d5f27d 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -32,6 +32,7 @@ #include "osabi.h" #include "dis-asm.h" #include "target-descriptions.h" +#include "floatformat.h" #include "m68k-tdep.h" diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index fffd40569cc..623ab7f42f1 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -36,7 +36,6 @@ #include "arch-utils.h" #include "regcache.h" #include "remote.h" -#include "floatformat.h" #include "sim-regno.h" #include "disasm.h" #include "trad-frame.h" diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 5fc06187873..05d7ae1e878 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -49,7 +49,6 @@ #include "frame-base.h" #include "trad-frame.h" #include "infcall.h" -#include "floatformat.h" #include "remote.h" #include "target-descriptions.h" #include "dwarf2-frame.h" diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c index 4ad49aef058..cf603376270 100644 --- a/gdb/nios2-tdep.c +++ b/gdb/nios2-tdep.c @@ -37,7 +37,6 @@ #include "value.h" #include "symfile.h" #include "arch-utils.h" -#include "floatformat.h" #include "infcall.h" #include "regset.h" #include "target-descriptions.h" diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index a6a6d5d9789..dfc7404f4b8 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -30,7 +30,6 @@ #include "gdbcore.h" #include "gdbcmd.h" #include "objfiles.h" -#include "floatformat.h" #include "regcache.h" #include "trad-frame.h" #include "frame-base.h" diff --git a/gdb/sparc-obsd-tdep.c b/gdb/sparc-obsd-tdep.c index fbe5aab795f..d495f714b25 100644 --- a/gdb/sparc-obsd-tdep.c +++ b/gdb/sparc-obsd-tdep.c @@ -18,7 +18,6 @@ along with this program. If not, see . */ #include "defs.h" -#include "floatformat.h" #include "frame.h" #include "frame-unwind.h" #include "gdbcore.h" diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 8bb69f5e36e..353b33cf592 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -22,7 +22,6 @@ #include "dis-asm.h" #include "dwarf2.h" #include "dwarf2-frame.h" -#include "floatformat.h" #include "frame.h" #include "frame-base.h" #include "frame-unwind.h" diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 8722f0acc80..b4ae1656785 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -20,7 +20,6 @@ #include "defs.h" #include "arch-utils.h" #include "dwarf2-frame.h" -#include "floatformat.h" #include "frame.h" #include "frame-base.h" #include "frame-unwind.h" diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 39cecfe5a5f..a7eb27d6381 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -38,7 +38,6 @@ #include "language.h" #include "regcache.h" #include "reggroups.h" -#include "floatformat.h" #include "block.h" #include "observer.h" #include "infcall.h" diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index 013a084a2f7..aff95b69adb 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -36,7 +36,6 @@ #include "value.h" #include "symfile.h" #include "arch-utils.h" -#include "floatformat.h" #include "glibc-tdep.h" #include "infcall.h" #include "regset.h" diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index 5291e10f60b..3a630c33d8a 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -31,10 +31,8 @@ #include "dis-asm.h" #include "inferior.h" #include "arch-utils.h" -#include "floatformat.h" #include "regcache.h" #include "regset.h" -#include "doublest.h" #include "osabi.h" #include "linux-tdep.h" #include "objfiles.h" diff --git a/gdb/top.c b/gdb/top.c index af27fcbcb0e..ed109344b28 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -41,7 +41,6 @@ #include "top.h" #include "version.h" #include "serial.h" -#include "doublest.h" #include "main.h" #include "event-loop.h" #include "gdbthread.h" diff --git a/gdb/value.c b/gdb/value.c index d0871ef5bb2..347eba5978e 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -29,6 +29,7 @@ #include "language.h" #include "demangle.h" #include "doublest.h" +#include "floatformat.h" #include "regcache.h" #include "block.h" #include "dfp.h" diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 4ff12fde3f6..04203de1c48 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -20,7 +20,6 @@ #include "defs.h" #include "arch-utils.h" #include "dis-asm.h" -#include "floatformat.h" #include "frame.h" #include "frame-base.h" #include "frame-unwind.h" diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index bed4305d230..153375a1bd1 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -30,9 +30,7 @@ #include "dis-asm.h" #include "inferior.h" #include "arch-utils.h" -#include "floatformat.h" #include "regcache.h" -#include "doublest.h" #include "osabi.h" #include "objfiles.h" #include "common/byte-vector.h" diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 51fa520702e..e8f6eb2c59e 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -29,7 +29,6 @@ #include "dis-asm.h" #include "inferior.h" #include "osabi.h" -#include "floatformat.h" #include "regcache.h" #include "reggroups.h" #include "regset.h"