From patchwork Fri Jul 13 13:52:11 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: 28371 Received: (qmail 99727 invoked by alias); 13 Jul 2018 13:53:37 -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 99558 invoked by uid 89); 13 Jul 2018 13:53:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=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= 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; Fri, 13 Jul 2018 13:53:35 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6DDnQsl033682 for ; Fri, 13 Jul 2018 09:53:34 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k6twv6ecj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 13 Jul 2018 09:53:33 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jul 2018 09:53:32 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 13 Jul 2018 09:53:29 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6DDrS2s9503110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 13 Jul 2018 13:53:28 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B3FA0AE05F; Fri, 13 Jul 2018 09:52:57 -0400 (EDT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9047EAE060; Fri, 13 Jul 2018 09:52:57 -0400 (EDT) Received: from pedro.localdomain (unknown [9.85.180.127]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 13 Jul 2018 09:52:57 -0400 (EDT) Received: by pedro.localdomain (Postfix, from userid 1000) id CCCEA3C0431; Fri, 13 Jul 2018 10:53:24 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com, edjunior@gmail.com Subject: [PATCH 02/17] [PowerPC] Fix two if statements in gdb/ppc-linux-nat.c Date: Fri, 13 Jul 2018 10:52:11 -0300 In-Reply-To: <20180713135226.2321-1-pedromfc@linux.ibm.com> References: <20180713135226.2321-1-pedromfc@linux.ibm.com> x-cbid: 18071313-0052-0000-0000-0000030D907A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009363; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01060763; UDB=6.00544525; IPR=6.00838682; MB=3.00022128; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-13 13:53:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071313-0053-0000-0000-00005D595574 Message-Id: <20180713135226.2321-3-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 9719a0e906..47028b8688 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -554,7 +554,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) { @@ -933,7 +933,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;