Clean up includes of doublest.h and floatformat.h
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Oct 2017 17:12:45 +0000 (19:12 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Oct 2017 17:12:45 +0000 (19:12 +0200)
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  <uweigand@de.ibm.com>

* 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.

27 files changed:
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/alpha-tdep.c
gdb/amd64-darwin-tdep.c
gdb/arm-linux-tdep.c
gdb/doublest.h
gdb/findvar.c
gdb/gdbtypes.c
gdb/i386-darwin-tdep.c
gdb/i387-tdep.c
gdb/m68k-linux-tdep.c
gdb/m68k-tdep.c
gdb/mep-tdep.c
gdb/mips-tdep.c
gdb/nios2-tdep.c
gdb/s390-linux-tdep.c
gdb/sparc-obsd-tdep.c
gdb/sparc-tdep.c
gdb/sparc64-tdep.c
gdb/spu-tdep.c
gdb/tic6x-tdep.c
gdb/tilegx-tdep.c
gdb/top.c
gdb/value.c
gdb/vax-tdep.c
gdb/xstormy16-tdep.c
gdb/xtensa-tdep.c

index 024664f04154ffdac82942e80226d4f4b4b9e213..5439ffb2844bfd60022dd28f1cc3cae3a2811177 100644 (file)
@@ -1,3 +1,38 @@
+2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * 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  <jhb@FreeBSD.org>
 
        * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
index da5731e783b4b99924643f88e552ace331c8327f..e74b7cd37053ce41641caac603b7be7e9797f3b5 100644 (file)
@@ -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"
index e66517d21cd888bd08010023bb1dc0f492ccbcdc..89556956abad406ffadc4f64b5af02b7980360a9 100644 (file)
@@ -18,7 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "doublest.h"
 #include "frame.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
index 7f6cb94ad64ecfea941f60282fc3d952b4f258e2..384d20944b7c47e3a9eff7019c5f3fc884c29eb9 100644 (file)
@@ -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"
index 72b91d4f2e299e9cbfecf6c6bac71fbc781b2249..056c1b94212c7d0f7e7a8ca29130155b0d2409f1 100644 (file)
 #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"
index a22baef89ed6dde91dcb74e9efffe6c7add53248..74d057291207922a55c0552d1090fa24fb51dc96 100644 (file)
 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
index b3fb337f7725bd4f26aba453c30ca0f50efe9ea6..2bc2095bf7bd8ef2787ed4a1a1db3292f06a7697 100644 (file)
@@ -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"
index 57bc218d91d1c1e73bef6b455f14ed2afa84a0d7..73d445361dd1028695447e141a6bcabb3a2422b5 100644 (file)
@@ -38,6 +38,7 @@
 #include "bcache.h"
 #include "dwarf2loc.h"
 #include "gdbcore.h"
+#include "floatformat.h"
 
 /* Initialize BADNESS constants.  */
 
index a888e10c895ba161edd90c78ff6c82858230788b..c6420404324e1df7464ebf442797de8115a2d4d2 100644 (file)
@@ -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"
index 574914cab78f6b62a720a08e6a70de5b171d92ef..3de7c62f4a0f94952b8e142bccc4d60e7e9befbd 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "defs.h"
 #include "doublest.h"
-#include "floatformat.h"
 #include "frame.h"
 #include "gdbcore.h"
 #include "inferior.h"
index fa0848f453aafc2f41adaff6b1cf9c6a1db88430..c911f2d4aca38cdbc582e398b6d4d1e4a186bad0 100644 (file)
@@ -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"
index ce126a8b814bd96df4dddb23100b70e805b1dd1c..37df9d5f27d092621a394323b564f93d75cd9819 100644 (file)
@@ -32,6 +32,7 @@
 #include "osabi.h"
 #include "dis-asm.h"
 #include "target-descriptions.h"
+#include "floatformat.h"
 
 #include "m68k-tdep.h"
 \f
index fffd40569cc65ad8323e5adf7e1346664e666225..623ab7f42f137f9745926755634d5d2794c75307 100644 (file)
@@ -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"
index 5fc061878734c4e89178cab37a94940701548879..05d7ae1e878c9f83868baac8da909ce9ceca7aab 100644 (file)
@@ -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"
index 4ad49aef058d2e05d210800a184d0daaae1b65fd..cf6033762707bfd82d0bc87be711cb2e617c00ad 100644 (file)
@@ -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"
index a6a6d5d978900d1d08da34eab1df2bd8ff7f6bdb..dfc7404f4b88bbdf2b830bea3df304e61bc25f19 100644 (file)
@@ -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"
index fbe5aab795fdefa1ab6aa33d19f0ac5f2226d734..d495f714b2554aea59c23865740feef7f0160d11 100644 (file)
@@ -18,7 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "floatformat.h"
 #include "frame.h"
 #include "frame-unwind.h"
 #include "gdbcore.h"
index 8bb69f5e36e1feed2afce1eb47c58ae368cea332..353b33cf592beaff5eb2686ecf80d1011b099e13 100644 (file)
@@ -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"
index 8722f0acc80c73931e7bce34b3b09421a432cc46..b4ae1656785fab9234368773e97e4f5f49354e3b 100644 (file)
@@ -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"
index 39cecfe5a5fb2d5cb074899036b6462d05e0db13..a7eb27d6381bf5f01df411bba7891cb61ae6e2af 100644 (file)
@@ -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"
index 013a084a2f7ddd46ecdba9d655c8dbe74cc7e980..aff95b69adb40aa0a8d11df690ebdc2954485c73 100644 (file)
@@ -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"
index 5291e10f60b85f6b20b842efe4c49089a2f9ebd4..3a630c33d8afe14de9c7e32b67bb02779742462c 100644 (file)
 #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"
index af27fcbcb0e3ea77b6dc3fe6bfb3dbc759dbcba8..ed109344b2838eff16805698b0cf91d2aa37c517 100644 (file)
--- 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"
index d0871ef5bb2a291ad4042504e2b306acfc9a6059..347eba5978eee18bd53853f5498051a66c5c128e 100644 (file)
@@ -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"
index 4ff12fde3f62a5091a4ec46fec3d0f07e7297fff..04203de1c48c629634a7fe9c1338ff5747ac080c 100644 (file)
@@ -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"
index bed4305d230d5def4563db13e5bde8eb4fd5b362..153375a1bd117e830888e8c773967c25bc03a629 100644 (file)
@@ -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"
index 51fa520702e28f774465b7bee03c8cd31069bbd0..e8f6eb2c59eb0ee8c3446f7874307f3285d342cc 100644 (file)
@@ -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"