PPC fix for stfiwx instruction (and additional stores with primary opcode of 31)
authorCarl Love <cel@us.ibm.com>
Fri, 8 Oct 2021 22:54:05 +0000 (22:54 +0000)
committerCarl Love <cel@us.ibm.com>
Wed, 13 Oct 2021 18:16:21 +0000 (13:16 -0500)
[gdb] Fix address being recorded in rs6000-tdep.c, ppc_process_record_op31.

The GDB record function was recording the variable addr that was passed in
rather than the calculated effective address (ea) by the
ppc_process_record_op31 function.

gdb/rs6000-tdep.c

index 826f0266ed84bfa3ae661af82eb079236c7a55ba..9c2bfca3e9c3277c3d17e52be457a9a2491244ad 100644 (file)
@@ -4993,20 +4993,20 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
       switch (ext)
        {
        case 167:       /* Store Vector Element Halfword Indexed */
-         addr = addr & ~0x1ULL;
+         ea = ea & ~0x1ULL;
          break;
 
        case 199:       /* Store Vector Element Word Indexed */
-         addr = addr & ~0x3ULL;
+         ea = ea & ~0x3ULL;
          break;
 
        case 231:       /* Store Vector Indexed */
        case 487:       /* Store Vector Indexed LRU */
-         addr = addr & ~0xfULL;
+         ea = ea & ~0xfULL;
          break;
        }
 
-      record_full_arch_list_add_mem (addr, size);
+      record_full_arch_list_add_mem (ea, size);
       return 0;
 
     case 397:          /* Store VSX Vector with Length */