--- ./gdb/aix-thread.c_orig	2024-03-14 05:27:24.160399652 +0000
+++ ./gdb/aix-thread.c	2024-03-14 05:30:32.724905792 +0000
@@ -136,6 +136,8 @@
   const char *extra_thread_info (struct thread_info *) override;
 
   ptid_t get_ada_task_ptid (long lwp, ULONGEST thread) override;
+
+  void update_thread_list () override;
 };
 
 static aix_thread_target aix_thread_ops;
@@ -1015,7 +1017,7 @@
    If successful and there exists and we can find an event thread, return a ptid
    for that thread.  Otherwise, return a ptid-only ptid using PID.  */
 
-static ptid_t
+static void 
 pd_activate (pid_t pid)
 {
   int status;
@@ -1030,7 +1032,21 @@
       return ptid_t (pid);
     }
   data->pd_active = 1;
-  return pd_update (pid);
+  return;
+}
+
+/* AIX implementation of update_thread_list.  */
+
+void
+aix_thread_target::update_thread_list ()
+{
+  for (inferior *inf : all_inferiors ())
+    {
+      if (inf->pid == 0)
+       continue;
+
+      pd_update (inf->pid);
+    }
 }
 
 /* An object file has just been loaded.  Check whether the current
@@ -1215,7 +1231,7 @@
 
       if (regcache_read_pc (regcache)
 	  - gdbarch_decr_pc_after_break (gdbarch) == data->pd_brk_addr)
-	return pd_activate (ptid.pid ());
+	pd_activate (ptid.pid ());
     }
 
   return pd_update (ptid.pid ());
