--- ./gdb/aix-thread.c_orig	2023-05-24 23:15:11.348637541 +0000
+++ ./gdb/aix-thread.c	2023-05-24 23:20:35.825182340 +0000
@@ -1692,6 +1693,55 @@
 	  ptrace32 (PTT_WRITE_SPRS, tid, (uintptr_t) &sprs32, 0, NULL);
 	}
     }
+    /* Vector registers.  */
+    if (tdep->ppc_vr0_regnum != -1 && tdep->ppc_vrsave_regnum != -1
+       && (regno == -1 || (regno >= tdep->ppc_vr0_regnum
+       && regno <= tdep->ppc_vrsave_regnum)))
+      {
+       __vmx_context_t vmx;int ret = 0;
+       if (__power_vmx())
+         {
+           if (data->arch64)
+             ret = ptrace64aix (PTT_READ_VEC, tid, (long long) &vmx, 0, 0);
+           else
+             ret = ptrace32 (PTT_READ_VEC, tid, (long long) &vmx, 0, 0);
+           if (ret > 0)
+             {
+               fill_altivec(regcache, &vmx);
+               if (data->arch64)
+                 ret = ptrace64aix (PTT_WRITE_VEC, tid, (long long) &vmx, 0, 0);
+               else
+                 ret = ptrace32 (PTT_WRITE_VEC, tid, (long long) &vmx, 0, 0);
+               if (ret < 0)
+                 perror_with_name (_("Unable to store AltiVec register after read"));
+             }
+         }
+      }
+
+    /* VSX registers.  */
+    if (tdep->ppc_vsr0_upper_regnum != -1 && (regno == -1
+       || (regno >=tdep->ppc_vsr0_upper_regnum
+       && regno < tdep->ppc_vsr0_upper_regnum + ppc_num_vshrs)))
+      {
+       __vsx_context_t vsx;int ret = 0;
+       if (__power_vsx())
+         {
+           if (data->arch64)
+             ret =  ptrace64aix (PTT_READ_VSX, tid, (long long) &vsx, 0, 0);
+           else
+             ret =  ptrace32 (PTT_READ_VSX, tid, (long long) &vsx, 0, 0);
+           if (ret > 0)
+             {
+               fill_vsx (regcache, &vsx);
+               if (data->arch64)
+                 ret = ptrace64aix (PTT_WRITE_VSX, tid, (long long) &vsx, 0, 0);
+               else
+                 ret = ptrace32 (PTT_WRITE_VSX, tid, (long long) &vsx, 0, 0);
+               if (ret < 0)
+                 perror_with_name (_("Unable to store VSX register after read"));
+             }
+         }
+      }
 }
 
 /* Store gdb's current view of the register set into the
