[PATCH] Fix-for-multiple-thread-detection-in-AIX.patch
Ulrich Weigand
Ulrich.Weigand@de.ibm.com
Tue Jul 19 12:21:12 GMT 2022
Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:
>The reason:- Since a new thread addition causes a thread target to
>wait, in AIX once the event ptid is got with the waitpid(), we need to
>set the inferior_ptid variable. Every time we come into
>aix_thread_target::wait() we check if libpthdebug might be ready to be
>initialized.In doing so we call pd_activate(). Here the session needs
>to be successfully initialised failing to which just a pid is >returned.
>We do not enter pd_update() in the former case to take care of the rest
>of the thread addition process. The pthdb_session_init() is dependent
>on inferior_ptid variable as per our observations to return
>PTHDB_SUCCESS.
I think the change to pd_enable makes sense, passing 1 to pd_activate
seems clearly incorrect now. Simon, you recently changed pd_activate
to take a PID instead of a boolean - any comments on this?
However, I do not see why the change to ::wait is necessary, or even
correct. Note that when ::wait calls pd_activate or pd_update, it
already passes the correct pid. I do not see any path from ::wait
to pd_enable.
Bye,
Ulrich
More information about the Gdb-patches
mailing list