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

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