Re: [PATCH v2] Fix AIX core dump while main thread exits.

Ulrich Weigand
2024-11-04T08:07:48Z

Aditya Vidyadhar Kamath <akamath996@gmail.com> wrote:

>diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
>index 9e6952b974f..4a050cdff10 100644
>--- a/gdb/aix-thread.c
>+++ b/gdb/aix-thread.c
>@@ -854,7 +854,7 @@ sync_threadlists (pid_t pid)
> thread exits and gets into a PST_UNKNOWN state. So this thread
> will not run in the above for loop. Therefore the below for loop
> is to manually delete such threads. */
>- for (struct thread_info *it : all_threads ())
>+ for (struct thread_info *it : all_threads_safe ())
> {
> aix_thread_info *priv = get_aix_thread_info (it);
> if (in_queue_threads.count (priv->pdtid) == 0

This is OK.

Thanks,
Ulrich