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

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

>I have moved the scope + switch_to_current_thread to pdc_read_data()
>where the dependency is needed in the call-backs as suggested by
>Ulrich. I also eliminated PD_USER variable as it is no longer needed.
>As far as the user_current_pid != 0 condition is concerned, we need
>this check during initialisation during the birth of the first
>inferior. We passed a parameter inferior_ptid.pid () in pd_enable ()
>which is 0 at that time.

This looks good to me, with just some coding-style / formatting
issues:

+    /* Before the first inferior is added, we pass inferior_ptid.pid()
from pd_enable() which
+       is 0. There is no need to switch threads during first
initialisation. In the rest
+       of the callbacks the current thread needs to be correct. */

Please use two spaces after each '.' in comments.  Also, watch the
maximum line length of 80.

+    if (user_current_pid != 0) 
+      switch_to_thread (current_inferior ()->process_target ()
,ptid_t(user_current_pid)); 


There should be a space after the "," and after "ptid_t" before the '('
.

Patch should be good to go with these changes.

Thanks,
Ulrich


  reply	other threads:[~2022-08-05 11:53 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
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 [this message]
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=dc70248eec2b81932bd17177e75afcaa9c704d13.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).