public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb: iterate over targets, not inferiors, to commit resumed
Date: Mon, 4 Mar 2024 11:34:11 -0500	[thread overview]
Message-ID: <50778bd5-64a3-47bb-bdbf-60c86e5a51a3@simark.ca> (raw)
In-Reply-To: <DM4PR11MB730331CA360A9CF3F9B4FB63C4232@DM4PR11MB7303.namprd11.prod.outlook.com>

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 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?

Simon

  reply	other threads:[~2024-03-04 16:34 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 [this message]
2024-03-12 19:05       ` Aktemur, Tankut Baris
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=50778bd5-64a3-47bb-bdbf-60c86e5a51a3@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tankut.baris.aktemur@intel.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).