Hi Ulrich and community, Please find attached the patch. >>- if (inf->in_initial_library_scan) >>+ if (inf_curr->in_initial_library_scan) >> return; >I think you should just use the incoming "inf" instead of >calling current_inferior again here. >> new_objfile (struct objfile *objfile) >> { >> if (objfile) >>- pd_enable (); >>+ pd_enable (NULL); > >} >This looks wrong - pd_enable (NULL) never does anything. >I think this needs to be pd_enable (current_inferior ()) here. Both are completed. Thanks for the suggestions. Kindly push these changes if it looks good. Have a nice day ahead. Regards, Aditya. From: Ulrich Weigand Date: Tuesday, 2 May 2023 at 8:22 PM To: gdb-patches@sourceware.org , Aditya Kamath1 Cc: Sangamesh Mallayya Subject: Re: [Patch] Fix Assertion pid 0 failure in AIX while running gdb.threads/foll-fork-other-thread Aditya Kamath1 wrote: >Please find attached the patch. Thanks! There still seem to be a couple of issues: >- inferior *inf = current_inferior (); >+ inferior *inf_curr = current_inferior (); > /* When attaching / handling fork child, don't try activating > thread debugging until we know about all shared libraries. */ >- if (inf->in_initial_library_scan) >+ if (inf_curr->in_initial_library_scan) > return; I think you should just use the incoming "inf" instead of calling current_inferior again here. > new_objfile (struct objfile *objfile) > { > if (objfile) >- pd_enable (); >+ pd_enable (NULL); > } This looks wrong - pd_enable (NULL) never does anything. I think this needs to be pd_enable (current_inferior ()) here. Otherwise this looks good now. Bye, Ulrich