This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] ppc: Fix record support of Store String Word instructions
- From: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Tue, 20 Sep 2016 05:04:05 -0300
- Subject: [PATCH] ppc: Fix record support of Store String Word instructions
- Authentication-results: sourceware.org; auth=none
Hi,
this patch aims to fix the record support of the ppc instructions Store String
Word Immediate and Store String Word Indexed. Ok?
Thanks,
--
Edjunior
2016-09-20 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* rs6000-tdep.c (ppc_process_record_op31): Fix record of Store String
Word instructions.
---
gdb/rs6000-tdep.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 5f15780..263dda0 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -4540,7 +4540,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
case 725: /* Store String Word Immediate */
ra = 0;
if (PPC_RA (insn) != 0)
- regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
+ regcache_raw_read_unsigned (regcache,
+ tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
ea += ra;
nb = PPC_NB (insn);
@@ -4554,7 +4555,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
case 661: /* Store String Word Indexed */
ra = 0;
if (PPC_RA (insn) != 0)
- regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
+ regcache_raw_read_unsigned (regcache,
+ tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
ea += ra;
regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &xer);
@@ -4562,7 +4564,9 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
if (nb != 0)
{
- regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &rb);
+ regcache_raw_read_unsigned (regcache,
+ tdep->ppc_gp0_regnum + PPC_RB (insn),
+ &rb);
ea += rb;
record_full_arch_list_add_mem (ea, nb);
}
--
2.5.5