From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9ZMfIi43cGgoADEAWB0awg (envelope-from ) for ; Thu, 10 Jul 2025 17:57:02 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YwQk3nPM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 695B91E11C; Thu, 10 Jul 2025 17:57:02 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 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 B2BAF1E0C2 for ; Thu, 10 Jul 2025 17:57:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32CC93857C6D for ; Thu, 10 Jul 2025 21:57:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32CC93857C6D Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YwQk3nPM Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 818BF3858C56 for ; Thu, 10 Jul 2025 21:56:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 818BF3858C56 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 818BF3858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752184588; cv=none; b=B4ed6M9V1dL1OvM/qSBnzm+dWDvTmGq215H0pSrpiuBycuKrjk1Z1SnDVe9mCV8hg7jElzWy5fi40jN30IN7QX3ah7Lx/yoaRXj7mJHb4KgMSMWya+/Au7ESD6MLXCXWQaNKiw3dUyItyssaewwhiq6L7u/jVJHZW5yW0XeXEUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752184588; c=relaxed/simple; bh=rtrheql5iDIX1acUtXbG5covPoz+13G5sbMoo4UMBNQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=BK02L4HGA/fcT08WJn2+HR+zeE+/DA0ZGAGtN2dyCu3CfuM2QGr+9kUNISOXpHbTBANv+1ktuX+EpcVZQJaqsCL7gO9MEUSofsRrAKhGX90cqinuvIUJBL14Wg+303dRz1OpU0Ag3aC6BmRlsuo3Ar5VzHzeeg/URlyKHnfuw6w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 818BF3858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752184588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Su4danyMVxVIpPA+NaVXy3rxMvVZahCFsA/aDFdMhXk=; b=YwQk3nPMznV0PkNFjT8kcDR1OKm6ZxpbXx+urPKKaHXQBs1eTQTo8KyBIFqkcVYuzshAWE GzmDyO2q8KN+VmMo5Iullr24IXKd/yu0q8EyzCfeUcuSXwZVAGc8ZV8dyHGDRH/SPCtglU /pM/V2F9OEU55gIY9jHSR8lfxTfNC9k= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-427-UUUv7wrAOW-_q0tRLaYx2g-1; Thu, 10 Jul 2025 17:56:26 -0400 X-MC-Unique: UUUv7wrAOW-_q0tRLaYx2g-1 X-Mimecast-MFC-AGG-ID: UUUv7wrAOW-_q0tRLaYx2g_1752184585 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D31831800290 for ; Thu, 10 Jul 2025 21:56:25 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.64.8]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0E3F618003FC; Thu, 10 Jul 2025 21:56:24 +0000 (UTC) Date: Thu, 10 Jul 2025 14:56:20 -0700 From: Kevin Buettner To: Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 3/3] gdb: extend the [[N]]::foo syntax for files Message-ID: <20250710145620.1549db70@f41-zbm-amd> In-Reply-To: <021778bb-0e9e-43f4-a462-d3b2bc3415dd@redhat.com> References: <20250619180540.2315103-1-guinevere@redhat.com> <20250619180540.2315103-4-guinevere@redhat.com> <20250709192729.099eca7d@f41-zbm-amd> <021778bb-0e9e-43f4-a462-d3b2bc3415dd@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: npd45fix48BHx-hyvTlKM1Fxp12qCqRXnWUK6ZvPZN0_1752184585 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII 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 Thu, 10 Jul 2025 12:07:48 -0300 Guinevere Larsen wrote: > On 7/9/25 11:27 PM, Kevin Buettner wrote: > > On Thu, 19 Jun 2025 15:05:40 -0300 > > Guinevere Larsen wrote: > > > >> + gdb_test "print ${ns0}::'${::srcfile_lib}'::gdb_dlmopen_glob" \ > >> + "No function .${::srcfile_lib}. in specified context." > > I'm wondering about this test. ${::srcfile_lib} refers to a file, > > right? If so, why does the message say "function"? > > This is an annoying case to work with... The error "No function %s in > specified context" comes from the "block: block COLONCOLON name" rule, > around line 1105 in my tree. > > The issue here is that the function "classify_name" couldn't find a file > named ${::srcfile_lib} in the specified namespace, and so it classified > that string as a generic name, rather than a file name. It's not even a > factor of not having enough information to differentiate, the issue is > that the name is miscategorized it would be impossible for us to even > know when it was meant as a file or a function. > > At present, this error can only refer to a file if the user is searching > for something in a namespace, so I could make that error checking > slightly more thorough, and keep the current message when no namespace > ID was used, and have a new "No function or file %s in specified > context" message. Would that be better, in your opinion? While it would be nice to use "file" to refer to files and "function" for functions, if we really can't differentiate, then I think using "No function or file %s..." is better than the current situation. Kevin