From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VcXjF+re2GqCKgUAWB0awg (envelope-from ) for ; Wed, 21 Oct 2026 11:48:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1792597738; bh=hwTS8ESgWBfp2woiQVNTloegY3uSWOhCM6TZEa+sGn8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jSLE26d9Y0tvUQm/lBmyKK5o64L3VMfwffMkXzS6ddYQFXL0MRqObPXrnrA7v90pc kAWAsrzAzgk2diGUzq9gTaVuB6Za8ZpHBb1NLGmXBPWr38TbFWXmDv/W7BkEL6E2bW YHmboD3sQBRIJ8bV0tZYGVPuKRJSbD+b0P3Ij9uo= Received: by simark.ca (Postfix, from userid 112) id 13E051E051; Wed, 21 Oct 2026 11:48:58 -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=PWJRrmNC; 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 313601E04D for ; Wed, 21 Oct 2026 11:48:55 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E49E4BA79A2 for ; Wed, 21 Oct 2026 15:48:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E49E4BA79A2 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=PWJRrmNC Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 1E8464BA2E1F for ; Wed, 21 Oct 2026 15:48:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E8464BA2E1F 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 1E8464BA2E1F Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792597709; cv=none; b=NcSR0rF2GqFijMQjdAlzoPoBR3ZMrkvmpAx9G4h1twIW2qoIzpSPVLLAOyqleIEYGFFlO7xG+Y0brp3ShIfzdfilRyURrR03GK5kKFPEYsSC5CoaPXhc0nhB51DQG7FTYidT5IgvsbdrbptCQqnz7tli4OyFx6eK76JTZ6ZVd4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792597709; c=relaxed/simple; bh=hwTS8ESgWBfp2woiQVNTloegY3uSWOhCM6TZEa+sGn8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=VBmk8+2mbcRFQ3ipc7FP7oaokYyXrq7Hio49v9NiZtSGrSjuT8xNAXiA/28f3k6gFGj2ouQd8YBw/zH6etNZuVifqZMJEQj4ayuQAprxaEPriqcTJWbbtnbix1clGrcyvQ5bpHZcB4+2K5SLyg60vO9vnwB8kd0z9oltDgUKxs4= ARC-Authentication-Results: i=1; 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=PWJRrmNC DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E8464BA2E1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1792597706; bh=hwTS8ESgWBfp2woiQVNTloegY3uSWOhCM6TZEa+sGn8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PWJRrmNC5czGUxOjwws3mJZZNeIo61xw64r//O0TWAvb359sp7yFnHf0+ry6N12sW kQOHou/oF+Qnj385GboyYZvTopkROgYInos4kQYxoYXzChpwqs0QI44hoOo136YVK9 p7fZm79NCjdFsh+zKxZZ3cs4xw63k4EKtkpdoZ3c= Received: by simark.ca (Postfix) id 8D2C71E04D; Wed, 21 Oct 2026 11:48:26 -0400 (EDT) Message-ID: Date: Wed, 21 Oct 2026 11:48:26 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 06/13] gdb: check exact results in the canonicalize selftest To: Tom Tromey , Simon Marchi Cc: gdb-patches@sourceware.org References: <20261020162054.2140671-1-simon.marchi@efficios.com> <20261020162054.2140671-7-simon.marchi@efficios.com> <87wlrbyt86.fsf@tromey.com> Content-Language: fr From: Simon Marchi In-Reply-To: <87wlrbyt86.fsf@tromey.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 10/21/26 11:21 AM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> The canonicalize selftest uses should_be_the_same, which canonicalizes > Simon> two names and checks that the results are equal. This doesn't check > Simon> what the canonical form actually is: both names going through the same > Simon> wrong conversion would still pass. > > I think the idea here is that gdb shouldn't actually care which form is > the canonical one. So I'm wondering if there's some reason you think it > should? I think it's nice to see how the function actually transforms its inputs, it helps understand what it does. And in a sense documents what the canonical form actually is, which could be useful. It also makes the test a bit more robust. If we have: should_be_the_same ("something", "something< void() >"); And I introduce a bug that makes the function "forget" to print "void", then both sides will canonicalize to: something<()> The test will still pass, when it could have caught the problem. > Maybe some kind of comment explaining that the rest of gdb ought not > care would be sufficient. As in, if some future developer needs to > change the canonicalizer to return something else for some reason, > they'd be free to. I think that the rest of GDB cares to some extent what the canonical for is. The functions that work with canonicalized names as inputs need to know what they could possibly encounter. With my patch, if a developer needs to change what the canonical form is, they will need to update the tests accordingly. But I think that it's a good thing, because it will make it clear how the behavior actually changes. Simon