From patchwork Tue Sep 5 18:20:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 22631 Received: (qmail 51685 invoked by alias); 5 Sep 2017 18:20:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 51608 invoked by uid 89); 5 Sep 2017 18:20:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=stale X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Sep 2017 18:20:41 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v85IJF3I036558 for ; Tue, 5 Sep 2017 14:20:39 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2csv9nyad5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 05 Sep 2017 14:20:39 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Sep 2017 19:20:37 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 5 Sep 2017 19:20:36 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v85IKZUF19071016 for ; Tue, 5 Sep 2017 18:20:35 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F356011C04C for ; Tue, 5 Sep 2017 19:16:57 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D446811C04A for ; Tue, 5 Sep 2017 19:16:57 +0100 (BST) Received: from oc3748833570.ibm.com (unknown [9.164.150.234]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Tue, 5 Sep 2017 19:16:57 +0100 (BST) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 0E121D8086F; Tue, 5 Sep 2017 20:20:35 +0200 (CEST) Subject: [RFC][01/19] Target FP: Clean up includes of doublest.h and floatformat.h To: gdb-patches@sourceware.org Date: Tue, 5 Sep 2017 20:20:35 +0200 (CEST) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17090518-0016-0000-0000-000004E8DB7D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17090518-0017-0000-0000-000028226BE8 Message-Id: <20170905182035.0E121D8086F@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-05_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709050267 [RFC][01/19] Target FP: 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. Bye, Ulrich ChangeLog: * doublest.h: Do not include "floatformat.h". Remove stale comments. * gdbtypes.c: Include "floatformat.h". * value.c: Likewise. * arm-tdep.c: Likewise. * m68k-tdep.c: Likewise. * sh64-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. Index: binutils-gdb/gdb/doublest.h =================================================================== --- binutils-gdb.orig/gdb/doublest.h +++ binutils-gdb/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 Index: binutils-gdb/gdb/gdbtypes.c =================================================================== --- binutils-gdb.orig/gdb/gdbtypes.c +++ binutils-gdb/gdb/gdbtypes.c @@ -38,6 +38,7 @@ #include "bcache.h" #include "dwarf2loc.h" #include "gdbcore.h" +#include "floatformat.h" /* Initialize BADNESS constants. */ Index: binutils-gdb/gdb/value.c =================================================================== --- binutils-gdb.orig/gdb/value.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/findvar.c =================================================================== --- binutils-gdb.orig/gdb/findvar.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/top.c =================================================================== --- binutils-gdb.orig/gdb/top.c +++ binutils-gdb/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: binutils-gdb/gdb/aarch64-tdep.c =================================================================== --- binutils-gdb.orig/gdb/aarch64-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/alpha-tdep.c =================================================================== --- binutils-gdb.orig/gdb/alpha-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/amd64-darwin-tdep.c =================================================================== --- binutils-gdb.orig/gdb/amd64-darwin-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/arm-linux-tdep.c =================================================================== --- binutils-gdb.orig/gdb/arm-linux-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/arm-tdep.c =================================================================== --- binutils-gdb.orig/gdb/arm-tdep.c +++ binutils-gdb/gdb/arm-tdep.c @@ -31,6 +31,7 @@ #include "regcache.h" #include "reggroups.h" #include "doublest.h" +#include "floatformat.h" #include "value.h" #include "arch-utils.h" #include "osabi.h" Index: binutils-gdb/gdb/i386-darwin-tdep.c =================================================================== --- binutils-gdb.orig/gdb/i386-darwin-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/i387-tdep.c =================================================================== --- binutils-gdb.orig/gdb/i387-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/m68k-linux-tdep.c =================================================================== --- binutils-gdb.orig/gdb/m68k-linux-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/m68k-tdep.c =================================================================== --- binutils-gdb.orig/gdb/m68k-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/mep-tdep.c =================================================================== --- binutils-gdb.orig/gdb/mep-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/mips-tdep.c =================================================================== --- binutils-gdb.orig/gdb/mips-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/nios2-tdep.c =================================================================== --- binutils-gdb.orig/gdb/nios2-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/s390-linux-tdep.c =================================================================== --- binutils-gdb.orig/gdb/s390-linux-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/sh64-tdep.c =================================================================== --- binutils-gdb.orig/gdb/sh64-tdep.c +++ binutils-gdb/gdb/sh64-tdep.c @@ -26,6 +26,7 @@ #include "frame-unwind.h" #include "dwarf2-frame.h" #include "symtab.h" +#include "floatformat.h" #include "gdbtypes.h" #include "gdbcmd.h" #include "gdbcore.h" Index: binutils-gdb/gdb/sparc-obsd-tdep.c =================================================================== --- binutils-gdb.orig/gdb/sparc-obsd-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/sparc-tdep.c =================================================================== --- binutils-gdb.orig/gdb/sparc-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/sparc64-tdep.c =================================================================== --- binutils-gdb.orig/gdb/sparc64-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/spu-tdep.c =================================================================== --- binutils-gdb.orig/gdb/spu-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/tic6x-tdep.c =================================================================== --- binutils-gdb.orig/gdb/tic6x-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/tilegx-tdep.c =================================================================== --- binutils-gdb.orig/gdb/tilegx-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/vax-tdep.c =================================================================== --- binutils-gdb.orig/gdb/vax-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/xstormy16-tdep.c =================================================================== --- binutils-gdb.orig/gdb/xstormy16-tdep.c +++ binutils-gdb/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" Index: binutils-gdb/gdb/xtensa-tdep.c =================================================================== --- binutils-gdb.orig/gdb/xtensa-tdep.c +++ binutils-gdb/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"