From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mJg1CR345WVr5zcAWB0awg (envelope-from ) for ; Mon, 04 Mar 2024 11:34:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1709570077; bh=nGraESF5A3ZoUow4tAPm+F6+BRNIMHA47a7BBtNar9Q=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=v1S2E+tnnPQ45qMCCnc3QBkbQxXDNTo2mAkfh7OZtIclu9S8BNrZqzGUzdbxXG7Oh JgzNTc7u/mpdw7vyL3Yu0rRj3d78aI06U9k8imirnfOm41XGl/4bfj5XiU/U/LWV4E 9+tyIjv//iOSPmGGiWIrd6IMTBUMlT5pGaWOgdg8= Received: by simark.ca (Postfix, from userid 112) id 149B81E0D2; Mon, 4 Mar 2024 11:34:37 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=f/0ri7UG; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E64B61E092 for ; Mon, 4 Mar 2024 11:34:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 790163858402 for ; Mon, 4 Mar 2024 16:34:34 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 94D233858D28 for ; Mon, 4 Mar 2024 16:34:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94D233858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 94D233858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709570054; cv=none; b=krJSXAiJ/gjvmKZx9asOmXVR0QuzE1LGZvJ2dnG9J5d2PCXLCba/pNJ+Qv0NwBKH1tcKdDBDmwnSsj2xL4mRVthBiuHanZKY+5Q0TJcxyJ2UM7sNWe9g9jyf2IlbbRQE2lymMGbqvZN2rpg58eTjevPgyjAQcEqUW5f+JUTxkz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709570054; c=relaxed/simple; bh=nGraESF5A3ZoUow4tAPm+F6+BRNIMHA47a7BBtNar9Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ErdkRrPHxhrIvgXPlm//nLonbM6eUkxmy0mItQwSfLc+iX68ESzuDEs2yVEw7RuLT2LlasEPam6ToZMAmWslSCvcJ1+kfTzecu9smxTbPpQ3dEmVD5Y5wDGzZCysvr+qLHNo6d3RGjem8oXKI9kKsqXjhw5yQWY35h+ICh9okZA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1709570051; bh=nGraESF5A3ZoUow4tAPm+F6+BRNIMHA47a7BBtNar9Q=; h=Date:Subject:To:References:From:In-Reply-To:From; b=f/0ri7UGHgSy0WHEgPyZ11lO9Xhpr9AJ+5ME0UJIcMDczMmrpHyBQ0b2P8k4labSB HKK381SerTH83RJwXdowPUqmsPS1Kl+5G6iu/d46qyOUs53lmaZntBE85pmqHkrCwM TJpTUPRkwR6gebdkHKM85yLh2ZOcXByU6Lbr++Js= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B099F1E092; Mon, 4 Mar 2024 11:34:11 -0500 (EST) Message-ID: <50778bd5-64a3-47bb-bdbf-60c86e5a51a3@simark.ca> Date: Mon, 4 Mar 2024 11:34:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: iterate over targets, not inferiors, to commit resumed To: "Aktemur, Tankut Baris" , "gdb-patches@sourceware.org" References: <20240301155259.1507053-1-tankut.baris.aktemur@intel.com> <9c467373-6960-42f8-8bfc-a1b94c9df70a@simark.ca> Content-Language: fr From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org 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