From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EupOAOXGoWkptQwAWB0awg (envelope-from ) for ; Fri, 27 Feb 2026 11:31:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1772209892; bh=8JIL33NZ+fINl8WZRouRhyEczpwNTGeqnzFXf1f4ric=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XqpCu7Ou27yQ05EN1+H7FT4jfYJeBU77ywhpGKeFhFJTYkmflu3otXFRTEGPex1Zs 40cE5nV+ucm5A8zGQgHu4T7dCI83P/CsBZwrxzNDsKrgByGtpZDz9NqpuO3CGCN7ON ljNZkICYHj3rQ1HC6MO+VNhFZPnhXqvmfOmG6zBE= Received: by simark.ca (Postfix, from userid 112) id CF3451E0DD; Fri, 27 Feb 2026 11:31:32 -0500 (EST) 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=ZLPsrv5h; 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 B3B3E1E089 for ; Fri, 27 Feb 2026 11:31:31 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 246CD4B9DB58 for ; Fri, 27 Feb 2026 16:31:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 246CD4B9DB58 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=ZLPsrv5h Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 020DA4B9DB4E for ; Fri, 27 Feb 2026 16:30:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 020DA4B9DB4E 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 020DA4B9DB4E 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=1772209831; cv=none; b=l4A8GKTWp3osb9CUZojPH2jKyhbwoq9b3wBNX6YehryVgWwTc7fyxMzSz0t/FqvGFowl28DZQ616140IxqYqYb0RILzIA+QmKi8Sx4g8iQ8Ws0bWbqxm5KA2920Ks+57gxkzssw8bCia1dtaaiujroHN4GPStmOXfS3j0SuO8hY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772209831; c=relaxed/simple; bh=8JIL33NZ+fINl8WZRouRhyEczpwNTGeqnzFXf1f4ric=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=iVC1jAShFC8ziSOl7TotXYRFOKh7NqEXqB0cpOoyn0j0xs39+njlpVhzmrQbQgj6nlm85V4PnMIbn0UqhNy1ag+TuzTd5wFbctfj5JenUa5eY+MY4+bplAoKC7RFA2g6EKJe0fyk/YvS7UssO+/0A8hHaN7LGxC+WUSb1gAelRY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 020DA4B9DB4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1772209829; bh=8JIL33NZ+fINl8WZRouRhyEczpwNTGeqnzFXf1f4ric=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZLPsrv5h6BozvRzKmO9vlYr3RemBCk+pqCj7pa/xu3/CCJWEL9+hRS+GJSh3RaAMd 7rtLsow5nD62fDrbaCcCZgY3V8WejawsogOCz1uQyvPxM7YaxiYtX3Z7L1POjQUaj3 w5a98+Yr0x/LWtNgQsFWkYnQcDeUQa4UJ0b03zXk= Received: by simark.ca (Postfix) id 6882B1E089; Fri, 27 Feb 2026 11:30:28 -0500 (EST) Message-ID: Date: Fri, 27 Feb 2026 11:30:27 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] Use a newtype for remote file descriptor To: Tom Tromey , gdb-patches@sourceware.org Cc: Simon Marchi References: <20260227-target-fd-newtype-v2-0-7a266666ae36@adacore.com> <20260227-target-fd-newtype-v2-1-7a266666ae36@adacore.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260227-target-fd-newtype-v2-1-7a266666ae36@adacore.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 2/27/26 9:28 AM, Tom Tromey wrote: > I was digging through the remote fd code and got a little confused at > some point about what kind of fd was used where. > > It seemed better to me to avoid any confusion by making the remote > file descriptor a newtype, i.e., incompatible with 'int'. > > I limited the change to the "public" API. That is, I let the file > descriptor as used by the actual target implementation methods remain > "int". > > This found one bug, namely that sparc64-tdep.c assumed that 0 was an > invalid value for a target fd. With this patch, we now have 2 different classes names scoped_target_fd. Is it a problem, ODR-wise? It looks like they have the same goal, so we could perhaps merge them. Simon