This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] [PowerPC] Fix two if statements in gdb/ppc-linux-nat.c
- From: Pedro Franco de Carvalho <pedromfc at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 26 Oct 2018 14:58:42 -0000
- Subject: [binutils-gdb] [PowerPC] Fix two if statements in gdb/ppc-linux-nat.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3d907528ca584b522125ce4ac818f45dfe7a9a24
commit 3d907528ca584b522125ce4ac818f45dfe7a9a24
Author: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
Date: Fri Oct 26 09:37:54 2018 -0300
[PowerPC] Fix two if statements in gdb/ppc-linux-nat.c
This patch changes two if statements to else if statements in
ppc-linux-nat.c:fetch_register for clarity.
gdb/ChangeLog:
2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
* ppc-linux-nat.c (fetch_register): Change if statement to else
if.
(store_register): Likewise.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/ppc-linux-nat.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ba06946..b6025a3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
+ * ppc-linux-nat.c (fetch_register): Change if statement to else
+ if.
+ (store_register): Likewise.
+
+2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
+
* rs6000-tdep.c: Remove reggroups.h include.
(rs6000_pseudo_register_reggroup_p): Remove.
(rs6000_gdbarch_init): Remove call to
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 0b7052d..f96fba4 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;