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

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