Thanks.

I have made the commit. https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=9247f052848f3961402754ebfbc1bc28cf0857a5

 

Have a nice day ahead.

 

Thanks and regards,
Aditya.

 

From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Date: Monday, 4 November 2024 at 1:37
PM
To: akamath996@gmail.com <akamath996@gmail.com>
Cc: gdb-patches@sourceware.org <gdb-patches@sourceware.org>, Aditya Kamath <Aditya.Kamath1@ibm.com>, SANGAMESH MALLAYYA <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH v2] Fix AIX core dump while main thread exits.

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