From: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
To: Simon Marchi <simark@simark.ca>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH] gdb: iterate over targets, not inferiors, to commit resumed
Date: Tue, 12 Mar 2024 19:05:06 +0000 [thread overview]
Message-ID: <DM4PR11MB7303DBA295F4354E27273C89C42B2@DM4PR11MB7303.namprd11.prod.outlook.com> (raw)
In-Reply-To: <50778bd5-64a3-47bb-bdbf-60c86e5a51a3@simark.ca>
On Monday, March 4, 2024 5:34 PM, Simon Marchi wrote:
> On 3/4/24 04:28, Aktemur, Tankut Baris wrote:
> > Hi Simon,
> >
> > I see; thanks for pointing this out. I'd then retract the patch. Let's
> > keep maybe_set_commit_resumed_all_targets and maybe_call_commit_resumed_all_targets
> > both have the same iteration for consistency. We can do the change in the future
> > when the amd-dbgapi target is converted to a process_stratum_target.
> >
> > Thanks
> > -Baris
>
> Great, thanks for your understanding. We'll hopefully get that sorted
> out this year.
>
> In the back of my mind, I'm also worried about this for other (mostly
> theoritical at this point) cases where we do things per-process-target,
> ignoring that there might be other targets on top that we're bypassing.
I agree. From a developer perspective, I think the distinction between
inf->top_target () and inf->process_target () is not so easy to make.
> I recently thought about this scenario, imagine we have the following
> inferiors:
>
> | inf1 | inf2
> target stratum | my-thread-target |
> process stratum | linux-nat | linux-nat
>
> Imagine the thread target is meant to pull events from the linux-nat
> target below and translate them to some higher level events about
> userspace thread. When infrun pulls events, it selects a random
> inferior and calls target_ops::wait with minus_one_ptid. What if
> inferior 2 is selected, and linux-nat returns an event about inferior 1,
> that was meant to be processed by my-thread-target?
Would it make sense to fetch the events per inferior using the inferior's
pid as the filter ptid? Is there a fundamental limitation against doing that?
-Baris
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2024-03-12 19:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 15:52 Tankut Baris Aktemur
2024-03-01 19:02 ` Simon Marchi
2024-03-04 9:28 ` Aktemur, Tankut Baris
2024-03-04 16:34 ` Simon Marchi
2024-03-12 19:05 ` Aktemur, Tankut Baris [this message]
2024-03-15 15:06 ` Simon Marchi
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=DM4PR11MB7303DBA295F4354E27273C89C42B2@DM4PR11MB7303.namprd11.prod.outlook.com \
--to=tankut.baris.aktemur@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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).