This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-7.12-branch] ppc: Fix record support of Store String Word instructions


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4e2b3c62a39b99edcd20c25774c1eee01ea6fad5

commit 4e2b3c62a39b99edcd20c25774c1eee01ea6fad5
Author: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Date:   Tue Sep 20 16:58:39 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.

Diff:
---
 gdb/ChangeLog     |  5 +++++
 gdb/rs6000-tdep.c | 10 +++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 92aec7a..6f45d50 100644
--- 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-06  Pedro Alves  <palves@redhat.com>
 
 	* top.c (wait_sync_command_done): Don't assume current_ui doesn't
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index eb12c5d..fab3583 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -4539,7 +4539,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
     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);
@@ -4553,7 +4554,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
     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);
@@ -4561,7 +4563,9 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
 
       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;
 	  record_full_arch_list_add_mem (ea, nb);
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]