Blob Blame History Raw
commit 9f7efd5bf76aa5065298d13aefb109ecfd7a825a
Author: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Date:   Tue Sep 20 12:24:30 2016 -0300

    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.

### 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
Index: gdb-7.6.1/gdb/rs6000-tdep.c
===================================================================
--- gdb-7.6.1.orig/gdb/rs6000-tdep.c	2017-08-29 20:31:52.226270560 +0200
+++ gdb-7.6.1/gdb/rs6000-tdep.c	2017-08-29 20:32:00.121345605 +0200
@@ -4642,7 +4642,8 @@
     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);
@@ -4657,7 +4658,8 @@
     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);
@@ -4665,7 +4667,9 @@
 
       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;
 	  if (record_full_arch_list_add_mem (ea, nb) != 0)
 	    return -1;