public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
To: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>,
	Aditya Kamath1 <Aditya.Kamath1@ibm.com>,
	"simon.marchi@efficios.com" <simon.marchi@efficios.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"simark@simark.ca" <simark@simark.ca>
Subject: Re: [PATCH] Fix-for-multiple-thread-detection-in-AIX.patch
Date: Tue, 19 Jul 2022 12:21:12 +0000	[thread overview]
Message-ID: <49119016e80e58fafea0248887148aca3d1aef8c.camel@de.ibm.com> (raw)
In-Reply-To: <CH2PR15MB35441421F1502487C47450E6D68A9@CH2PR15MB3544.namprd15.prod.outlook.com>

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


  reply	other threads:[~2022-07-19 12:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 15:51 Aditya Kamath1
2022-07-16  3:57 ` Aditya Kamath1
2022-07-19 12:21   ` Ulrich Weigand [this message]
2022-07-22 17:03     ` Aditya Kamath1
2022-07-25 12:04       ` Aditya Kamath1
2022-07-25 12:21         ` Ulrich Weigand
2022-07-25 15:30           ` Simon Marchi
2022-07-29  9:23             ` Aditya Kamath1
2022-08-01 17:25               ` Aditya Kamath1
2022-08-03 16:22               ` Ulrich Weigand
2022-08-04 15:15                 ` Aditya Kamath1
2022-08-05  5:01                   ` Aditya Kamath1
2022-08-05 11:53                     ` Ulrich Weigand
2022-08-05 14:11                       ` Aditya Kamath1
2022-08-05 14:18                         ` Ulrich Weigand
2022-08-05 14:24                           ` Aditya Kamath1
2022-08-09  2:36                             ` Aditya Kamath1
2022-08-09 13:41                               ` Ulrich Weigand
2022-08-10  6:57                                 ` Aditya Kamath1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49119016e80e58fafea0248887148aca3d1aef8c.camel@de.ibm.com \
    --to=ulrich.weigand@de.ibm.com \
    --cc=Aditya.Kamath1@ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=simark@simark.ca \
    --cc=simon.marchi@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).