Blame SOURCES/gdb-rhbz1480498-power-record-2of3.patch

2c2fa1
commit 9f7efd5bf76aa5065298d13aefb109ecfd7a825a
2c2fa1
Author: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2c2fa1
Date:   Tue Sep 20 12:24:30 2016 -0300
2c2fa1
2c2fa1
    ppc: Fix record support of Store String Word instructions
2c2fa1
    
2c2fa1
    gdb/ChangeLog
2c2fa1
    2016-09-20  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2c2fa1
    
2c2fa1
            * rs6000-tdep.c (ppc_process_record_op31): Fix record of Store String
2c2fa1
            Word instructions.
2c2fa1
2c2fa1
### a/gdb/ChangeLog
2c2fa1
### b/gdb/ChangeLog
2c2fa1
## -1,3 +1,8 @@
2c2fa1
+2016-09-20  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2c2fa1
+
2c2fa1
+	* rs6000-tdep.c (ppc_process_record_op31): Fix record of Store String
2c2fa1
+	Word instructions.
2c2fa1
+
2c2fa1
 2016-09-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2c2fa1
 
2c2fa1
 	* fork-inferior.c (startup_inferior): Pass 'event_ptid' instead of
2c2fa1
Index: gdb-7.6.1/gdb/rs6000-tdep.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/rs6000-tdep.c	2017-08-29 20:31:52.226270560 +0200
2c2fa1
+++ gdb-7.6.1/gdb/rs6000-tdep.c	2017-08-29 20:32:00.121345605 +0200
2c2fa1
@@ -4642,7 +4642,8 @@
2c2fa1
     case 725:		/* Store String Word Immediate */
2c2fa1
       ra = 0;
2c2fa1
       if (PPC_RA (insn) != 0)
2c2fa1
-	regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
2c2fa1
+	regcache_raw_read_unsigned (regcache,
2c2fa1
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
2c2fa1
       ea += ra;
2c2fa1
 
2c2fa1
       nb = PPC_NB (insn);
2c2fa1
@@ -4657,7 +4658,8 @@
2c2fa1
     case 661:		/* Store String Word Indexed */
2c2fa1
       ra = 0;
2c2fa1
       if (PPC_RA (insn) != 0)
2c2fa1
-	regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
2c2fa1
+	regcache_raw_read_unsigned (regcache,
2c2fa1
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
2c2fa1
       ea += ra;
2c2fa1
 
2c2fa1
       regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &xer);
2c2fa1
@@ -4665,7 +4667,9 @@
2c2fa1
 
2c2fa1
       if (nb != 0)
2c2fa1
 	{
2c2fa1
-	  regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &rb);
2c2fa1
+	  regcache_raw_read_unsigned (regcache,
2c2fa1
+				      tdep->ppc_gp0_regnum + PPC_RB (insn),
2c2fa1
+				      &rb);
2c2fa1
 	  ea += rb;
2c2fa1
 	  if (record_full_arch_list_add_mem (ea, nb) != 0)
2c2fa1
 	    return -1;