From patchwork Fri Aug 10 02:52:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Franco de Carvalho X-Patchwork-Id: 28825 Received: (qmail 85782 invoked by alias); 10 Aug 2018 02:52:45 -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 85621 invoked by uid 89); 10 Aug 2018 02:52:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1171 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Aug 2018 02:52:42 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7A2n96b133346 for ; Thu, 9 Aug 2018 22:52:41 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ks1g39cav-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 09 Aug 2018 22:52:40 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Aug 2018 20:52:40 -0600 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 9 Aug 2018 20:52:38 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7A2qZHM62717952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 9 Aug 2018 19:52:35 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 854BBBE054; Thu, 9 Aug 2018 20:52:35 -0600 (MDT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44504BE04F; Thu, 9 Aug 2018 20:52:35 -0600 (MDT) Received: from pedro.localdomain (unknown [9.85.189.55]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 9 Aug 2018 20:52:35 -0600 (MDT) Received: by pedro.localdomain (Postfix, from userid 1000) id E56CD3C0543; Thu, 9 Aug 2018 23:52:29 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com, edjunior@gmail.com Subject: [PATCH v2 05/12] [PowerPC] Fix two if statements in gdb/ppc-linux-nat.c Date: Thu, 9 Aug 2018 23:52:03 -0300 In-Reply-To: <20180810025210.6942-1-pedromfc@linux.ibm.com> References: <20180810025210.6942-1-pedromfc@linux.ibm.com> x-cbid: 18081002-0036-0000-0000-00000A1F8217 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009516; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01071497; UDB=6.00551796; IPR=6.00851231; MB=3.00022623; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-10 02:52:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18081002-0037-0000-0000-0000488710F2 Message-Id: <20180810025210.6942-6-pedromfc@linux.ibm.com> This patch changes two if statements to else if statements in ppc-linux-nat.c:fetch_register for clarity. gdb/ChangeLog: YYYY-MM-DD Pedro Franco de Carvalho * ppc-linux-nat.c (fetch_register): Change if statement to else if. (store_register): Likewise. --- gdb/ppc-linux-nat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 0b7052d0f6..f96fba4b00 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -552,7 +552,7 @@ fetch_register (struct regcache *regcache, int tid, int regno) AltiVec registers, fall through and return zeroes, because regaddr will be -1 in this case. */ } - if (vsx_register_p (gdbarch, regno)) + else if (vsx_register_p (gdbarch, regno)) { if (have_ptrace_getsetvsxregs) { @@ -928,7 +928,7 @@ store_register (const struct regcache *regcache, int tid, int regno) store_altivec_registers (regcache, tid, regno); return; } - if (vsx_register_p (gdbarch, regno)) + else if (vsx_register_p (gdbarch, regno)) { store_vsx_registers (regcache, tid, regno); return;