From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6407 invoked by alias); 19 Apr 2016 15:10:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6201 invoked by uid 89); 19 Apr 2016 15:10:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: e06smtp14.uk.ibm.com Received: from e06smtp14.uk.ibm.com (HELO e06smtp14.uk.ibm.com) (195.75.94.110) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 19 Apr 2016 15:10:10 +0000 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Apr 2016 16:10:07 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 19 Apr 2016 16:09:38 +0100 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 30C7117D805A for ; Tue, 19 Apr 2016 16:10:25 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u3JF9bWx3146112 for ; Tue, 19 Apr 2016 15:09:37 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u3JF9acv014858 for ; Tue, 19 Apr 2016 09:09:37 -0600 Received: from oc1027705133.ibm.com (dyn-9-152-212-143.boeblingen.de.ibm.com [9.152.212.143]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u3JF9ZPG014823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2016 09:09:35 -0600 From: Andreas Arnez To: Yao Qi Cc: gdb-patches@sourceware.org, "Markus T. Metzger" Subject: Re: [PATCH] linux-record: Squash cases with identical handling References: <86ega9k97g.fsf@gmail.com> <868u0gmrf2.fsf@gmail.com> Date: Tue, 19 Apr 2016 15:10:00 -0000 In-Reply-To: <868u0gmrf2.fsf@gmail.com> (Yao Qi's message of "Thu, 14 Apr 2016 11:10:57 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16041915-0017-0000-0000-0000166C0A66 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00450.txt.bz2 On Thu, Apr 14 2016, Yao Qi wrote: > Andreas Arnez writes: > >> On Wed, Apr 13 2016, Yao Qi wrote: >> >>> I thought about squashing them too, but the reason I didn't do that is >>> these enum gdb_syscall in the switch block are listed in the numeric >>> order, so that it is quite easy to find whether a syscall is supported, >>> or add a new syscall. >> >> Ah, interesting point. If we want to stick to this rule, maybe this >> should be stated in a comment above the switch statement? >> > > It is not my intention to stick to this rule. > >> Or should we aim at getting GDB '-Wswitch'-clean? (Probably a good idea > > -Wswitch is enabled by -Wall, so gdb is '-Wswitch'-clean already. Well, GDB currently uses -Wno-switch. And if I build GDB without that option, I get lots of warnings for -Wswitch. > >> anyhow...) Then we could replace the default label by explicit case >> labels for all unsupported syscalls and rely on GCC to catch any further >> missing case labels. Once that's done, the order of case labels >> wouldn't matter, IMO. >> > > That will be overkill compared with your patch, so ... > >>> but, I don't like the fall-through. >> >> Yeah, it's kind of ugly. I can certainly drop this change from the >> patch if that helps. >> > > ... your patch except the fall-through is good to me. Thanks, pushed without that. -- Andreas