From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id B88uLYNg5mmW/CwAWB0awg (envelope-from ) for ; Mon, 20 Apr 2026 13:21:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1776705667; bh=0V1e3XNJ8/4ToZB4NWUKX2XpGcbMzJqRKEPLFQAV+pg=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RtBZNWHDtZs45iU9XNCt67A/iwExTQV++l3XMSo6A5A/AITSwXRiMUs93gHnV732v imhZk4CGb3toB8GLhfp7Wr/6KWV3TeoaYciBya0Bm8goievlYW28gND8GGswEPvxZa YF0uH4nRn3t5cD0cX7yW4Kxf8xdvPG6YBv37q0ZM= Received: by simark.ca (Postfix, from userid 112) id 9A51D1E0C3; Mon, 20 Apr 2026 13:21:07 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 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=rc4tVxiL; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 009161E093 for ; Mon, 20 Apr 2026 13:21:07 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 902094A98F00 for ; Mon, 20 Apr 2026 17:21:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 902094A98F00 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=rc4tVxiL Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id CD76D4B7A1C5 for ; Mon, 20 Apr 2026 17:20:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD76D4B7A1C5 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 CD76D4B7A1C5 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=1776705642; cv=none; b=c8UdUNdrKDp6dy1yI037RxvZeKJ20j50WGLyFxxCJK8AirQiL3tIFkeJR3xFZ45PsKA9KHaMv02c9dm0PIyNWSwK9D+n7LzGv1/HVWc+bG2WQsZvTlwlbEpENLfCCUP4ptwljpSZGgfimpY8QnUYqqqiIP35XijYYRkZ5F5tDsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776705642; c=relaxed/simple; bh=0V1e3XNJ8/4ToZB4NWUKX2XpGcbMzJqRKEPLFQAV+pg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=IqkJZSCTmeep6HpWEZrF2zKENF5vGX8mOIdvt8d8RLhT6V4aAeul6lMei32EaZqyFQK8a1HLCaq68VHPvoPj2tiQ2VX84jUMg9p8CeAnrRXrHhK3JR2zOJxK+O7E2IQRhDJVbP+HUcN+usylTrHgysVGn7E2ILzoSOINWATKkXA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD76D4B7A1C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1776705641; bh=0V1e3XNJ8/4ToZB4NWUKX2XpGcbMzJqRKEPLFQAV+pg=; h=Date:Subject:To:References:From:In-Reply-To:From; b=rc4tVxiLJlGmcL1dmq1DXMRds4TM0by+DyTasW69WoZLeC/vKCRTm0b+BDKfRN49G Y2qmFQ7GvE9scVLkH+MVt99Bb7Swvx5kuOFPQgg8VruopM2cdNITRPOFoSvZYPbxym shzSEugcNYZdX2GcZyZvdKl4hQJ+7cS43xAg6+vA= Received: by simark.ca (Postfix) id 1DCAD1E093; Mon, 20 Apr 2026 13:20:40 -0400 (EDT) Message-ID: Date: Mon, 20 Apr 2026 13:20:39 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] gdb, multi-target: pass a target argument to delete_exited_threads To: Tankut Baris Aktemur , gdb-patches@sourceware.org References: <20260420134611.4009838-1-tankut.baris.aktemur@intel.com> <20260420134611.4009838-3-tankut.baris.aktemur@intel.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260420134611.4009838-3-tankut.baris.aktemur@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 4/20/26 9:46 AM, Tankut Baris Aktemur wrote: > diff --git a/gdb/inferior.c b/gdb/inferior.c > index e050dec402e..1481f46cdd1 100644 > --- a/gdb/inferior.c > +++ b/gdb/inferior.c > @@ -368,7 +368,7 @@ inferior_appeared (struct inferior *inf, int pid) > { > /* If this is the first inferior with threads, reset the global > thread id. */ > - delete_exited_threads (); > + delete_exited_threads (nullptr); Not related to your patch, but I'm a bit curious to know why this delete_exited_threads is not done when we "mourn" the previous existence of the inferior. In the lifecycle of an inferior, there should always be a point where an inferior stops "being", before "becoming" a new execution. At that point, the process target would be known and we could pass it to delete_exited_threads. > @@ -2112,7 +2112,7 @@ thread_select (const char *tidstr, thread_info *tp) > > /* Since the current thread may have changed, see if there is any > exited thread we can now delete. */ > - delete_exited_threads (); > + delete_exited_threads (nullptr); I don't know if it's worthwhile, but we could restrict this one to the process target of the previously selected thread. Approved-By: Simon Marchi Simon