diff options
author | Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> | 2016-09-20 12:24:30 -0300 |
---|---|---|
committer | Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> | 2016-09-20 12:24:30 -0300 |
commit | 9f7efd5bf76aa5065298d13aefb109ecfd7a825a (patch) | |
tree | ffacf2674b61fbd24e5c77b89ea57dad60ce7b27 | |
parent | d4ed4da3f56e9281e22f0ec2d20def671fba52d1 (diff) | |
download | gdb-9f7efd5bf76aa5065298d13aefb109ecfd7a825a.zip gdb-9f7efd5bf76aa5065298d13aefb109ecfd7a825a.tar.gz gdb-9f7efd5bf76aa5065298d13aefb109ecfd7a825a.tar.bz2 |
ppc: Fix record support of Store String Word instructions
gdb/ChangeLog
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0dacaf6..2b0589a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +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. + 2016-09-20 Sergio Durigan Junior <sergiodj@redhat.com> * fork-inferior.c (startup_inferior): Pass 'event_ptid' instead of 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); } |