Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aditya Kamath <Aditya.Kamath1@ibm.com>
To: Abhay Kandpal <abhay@linux.ibm.com>,
	Aditya Vidyadhar Kamath <akamath996@gmail.com>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"simon.marchi@polymtl.ca" <simon.marchi@polymtl.ca>,
	"tom@tromey.com" <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	SANGAMESH MALLAYYA <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH v2] Speed up next/step while debugging multithreaded programs on AIX.
Date: Wed, 16 Sep 2026 11:36:41 +0000	[thread overview]
Message-ID: <LV8PR15MB6488B6528394B15CB08B1BF4D6BA2@LV8PR15MB6488.namprd15.prod.outlook.com> (raw)
In-Reply-To: <ef05f700-29bb-4fa0-a13d-61b5fa7d8b7c@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

Hi Abhay and community members,

Thank you for the feedback so far.

Please see my comments.

>inferior_thread () returns the currently selected thread, >which is not
>necessarily the thread named by the ptid argument.  Since
>thread_has_single_step_breakpoints_set () is a per-thread >query, asking
>it about the wrong thread would give the wrong answer for
>last_resume_step.
>The else branch a few lines below already resolves the >thread from the
>argument:
>  thread = current_inferior ()->find_thread (ptid);
>Would that be more appropriate here?  I am also unsure what >the flag
>should be when ptid.tid () == 0 and the resume covers more >than one
>thread.

>
>Separately, would it be worth adding testsuite coverage for >this?  The
>benchmark program creates all 20 threads before do_steps (), >so the
>thread population never changes after the first stop and it >cannot
>exercise the case the v1 logic got wrong.

>Something that creates threads between two breakpoint stops >and checks
>"info threads" at the second one would cover it, and a >"next" over a
>call that spawns a thread would cover Simon's point.  I >don't have an
>AIX machine to run it on, so I can't offer a patch for it >myself.


Have done the same in v3 version of this patch and also corrected the thread_has_single_step_breakpoints_set () to use ptid. Thanks for the suggestions. Let me know your thoughts and if I missed anything.

Have a nice day.

Thanks and regards,
Aditya.

[-- Attachment #2: Type: text/html, Size: 4197 bytes --]

      reply	other threads:[~2026-09-16 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 10:16 Aditya Vidyadhar Kamath
2026-09-10 13:14 ` Ulrich Weigand
2026-09-10 13:45   ` Simon Marchi
2026-09-16 11:38     ` Aditya Kamath
2026-09-10 13:25 ` Simon Marchi
2026-09-16 11:40   ` Aditya Kamath
2026-09-10 17:32 ` Abhay Kandpal
2026-09-16 11:36   ` Aditya Kamath [this message]

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=LV8PR15MB6488B6528394B15CB08B1BF4D6BA2@LV8PR15MB6488.namprd15.prod.outlook.com \
    --to=aditya.kamath1@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=abhay@linux.ibm.com \
    --cc=akamath996@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tom@tromey.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