From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103006 invoked by alias); 14 Apr 2016 10:11:17 -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 102986 invoked by uid 89); 14 Apr 2016 10:11:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pa0-f50.google.com Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 14 Apr 2016 10:11:15 +0000 Received: by mail-pa0-f50.google.com with SMTP id zm5so43764112pac.0 for ; Thu, 14 Apr 2016 03:11:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=zsT95FUm/OikF0rvmZ9/pILPffpYJy8pfOySPgU8vMY=; b=nCFvxX3PLOxQ0GaHOH+SCVXYBbGhDkzGThO1FgoLG7gBuWhhUrJbaf4/wxS9Ima8Wz 1wv7pKkNbTe0bDud5eb5PZIxpoY5puHIGrgSYhvs90o/1V1ie/F4pM38+L4XiV2lwooW kiYFTh7EtMFCPFH3S8fg8xB8hMWcgy1/nqgLSmDYI2ynzx9Vq1fnZ7c43PbKHxLPKfoy OEXY74qutFrAEfmC4ZOOxTDA6XfaPhpjphn/Q7v9hRuGmYjjSBL2xXslhg2Rf2fGNICY gJn/NAhRYApqTznG1FjPKkE14VN1cnJwbjRDi4X3kpmv4L219nwKFbfOmaad78ZVYQ8P qYWw== X-Gm-Message-State: AOPr4FWeGGY9uJBLUtsxwbCyTL4Rfo1OpAu41LrpAzPTWZUPOwQ/rKhgnIXq2Epzcbsw8Q== X-Received: by 10.66.169.109 with SMTP id ad13mr19769101pac.20.1460628673611; Thu, 14 Apr 2016 03:11:13 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id p75sm56801683pfi.29.2016.04.14.03.11.10 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 03:11:12 -0700 (PDT) From: Yao Qi To: Andreas Arnez Cc: Yao Qi , gdb-patches@sourceware.org, "Markus T. Metzger" Subject: Re: [PATCH] linux-record: Squash cases with identical handling References: <86ega9k97g.fsf@gmail.com> Date: Thu, 14 Apr 2016 10:11:00 -0000 In-Reply-To: (Andreas Arnez's message of "Wed, 13 Apr 2016 17:04:53 +0200") Message-ID: <868u0gmrf2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00321.txt.bz2 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. > 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. --=20 Yao (=E9=BD=90=E5=B0=A7)