Blame SOURCES/gdb-rhbz1320945-power9-35of38.patch

2c2fa1
commit de6784544abc97d5e396cb1e83eda1ae09f63d40
2c2fa1
Author: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2c2fa1
Date:   Thu Sep 22 11:33:56 2016 -0300
2c2fa1
2c2fa1
    Fix build breakage from commit 6ec2b2
2c2fa1
    
2c2fa1
    I was notified by buildbot that my patch (commit 6ec2b2) has broken the build
2c2fa1
    on x86_64:
2c2fa1
    
2c2fa1
    ../../binutils-gdb/gdb/rs6000-tdep.c: In function int ppc_process_record_op31(gdbarch*, regcache*, CORE_ADDR, uint32_t):
2c2fa1
    ../../binutils-gdb/gdb/rs6000-tdep.c:4705:50: error: cannot convert CORE_ADDR* {aka long unsigned int*} to ULONGEST* {aka long long unsigned int*} for argument 3 to register_status regcache_raw_read_unsigned(regcache*, int, ULONGEST*)
2c2fa1
             tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
2c2fa1
                                                      ^
2c2fa1
    ../../binutils-gdb/gdb/rs6000-tdep.c:4718:50: error: cannot convert CORE_ADDR* {aka long unsigned int*} to ULONGEST* {aka long long unsigned int*} for argument 3 to register_status regcache_raw_read_unsigned(regcache*, int, ULONGEST*)
2c2fa1
             tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
2c2fa1
                                                      ^
2c2fa1
    The patch below should fix it.
2c2fa1
    
2c2fa1
    gdb/ChangeLog:
2c2fa1
    2016-09-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2c2fa1
    
2c2fa1
            * rs6000-tdep.c (ppc_process_record_op31): Fix
2c2fa1
            regcache_raw_read_unsigned call using the correct parameter type.
2c2fa1
2c2fa1
### a/gdb/ChangeLog
2c2fa1
### b/gdb/ChangeLog
2c2fa1
## -1,3 +1,8 @@
2c2fa1
+2016-09-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2c2fa1
+
2c2fa1
+	* rs6000-tdep.c (ppc_process_record_op31): Fix
2c2fa1
+	regcache_raw_read_unsigned call using the correct parameter type.
2c2fa1
+
2c2fa1
 2016-09-22  Anton Kolesov  <anton.kolesov@synopsys.com>
2c2fa1
 
2c2fa1
 	* arc-tdep.c: Fix ARI warning for printf(%p).
2c2fa1
--- a/gdb/rs6000-tdep.c
2c2fa1
+++ b/gdb/rs6000-tdep.c
2c2fa1
@@ -4700,9 +4700,11 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
2c2fa1
 
2c2fa1
     case 397:		/* Store VSX Vector with Length */
2c2fa1
     case 429:		/* Store VSX Vector Left-justified with Length */
2c2fa1
+      ra = 0;
2c2fa1
       if (PPC_RA (insn) != 0)
2c2fa1
 	regcache_raw_read_unsigned (regcache,
2c2fa1
-				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
2c2fa1
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
2c2fa1
+      ea = ra;
2c2fa1
       regcache_raw_read_unsigned (regcache,
2c2fa1
 				  tdep->ppc_gp0_regnum + PPC_RB (insn), &rb);
2c2fa1
       /* Store up to 16 bytes.  */
2c2fa1
@@ -4713,9 +4715,11 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
2c2fa1
 
2c2fa1
     case 710:		/* Store Word Atomic */
2c2fa1
     case 742:		/* Store Doubleword Atomic */
2c2fa1
+      ra = 0;
2c2fa1
       if (PPC_RA (insn) != 0)
2c2fa1
 	regcache_raw_read_unsigned (regcache,
2c2fa1
-				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
2c2fa1
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
2c2fa1
+      ea = ra;
2c2fa1
       switch (ext)
2c2fa1
 	{
2c2fa1
 	case 710:	/* Store Word Atomic */