Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ulrich Weigand via Gdb-patches <gdb-patches@sourceware.org>
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: Mon, 25 Jul 2022 12:21:33 +0000	[thread overview]
Message-ID: <ef0a6afec790999042c60371917266d8e9b44841.camel@de.ibm.com> (raw)
In-Reply-To: <CH2PR15MB35442EB4AB21177F7ECBF633D6959@CH2PR15MB3544.namprd15.prod.outlook.com>


Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:

>The cause of the bug :- Since, for the GDB core we are
>switch_to_no_thread() i.e. we do not have a thread till we return the
>pid from the wait() there is no thread. So, when a call is made from
>pd_activate() in wait() of aix-thread.c, to pthdb_session_init() we are
>going to recieve PTHDB_NOT_THREADED.

Thanks for the explanation.  I wasn't aware the use of
inferior_ptid happens in some of callback routines used
by the pthdb_session_init() library routine.

I still think the proposed fix isn't really ideal.  Can you instead
try to *temporarily* (i.e. using a scoped_restore) set up inferior_ptid
in pd_activate() before calling pthdb_session_init(), with a comment
explaining that this is needed for the callbacks?

[ pd_activate currently gets a pid.  If this isn't sufficient to set
up inferior_ptid, you might have to change the pd_activate interface
again to take a full ptid. ]


Bye,
Ulrich


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

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

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=ef0a6afec790999042c60371917266d8e9b44841.camel@de.ibm.com \
    --to=gdb-patches@sourceware.org \
    --cc=Aditya.Kamath1@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --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