From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id P/ihBeBcW2jjIh0AWB0awg (envelope-from ) for ; Tue, 24 Jun 2025 22:20:16 -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=d2+8f7mx; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EEBF61E11C; Tue, 24 Jun 2025 22:20:15 -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 241561E089 for ; Tue, 24 Jun 2025 22:20:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA0393857C67 for ; Wed, 25 Jun 2025 02:20:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA0393857C67 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=d2+8f7mx 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 DF2493858416 for ; Wed, 25 Jun 2025 02:19:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF2493858416 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 DF2493858416 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=1750817955; cv=none; b=IeZ1Kfw693nebCEyqB2SQLS8F2caeLJlY4avS2BnJQzR6vkl0YDOCmTNVEIxITzGaJV1hZDsjl55QizDOLPHbTVReMew124+RSKNLChAX/+vYXUyDK9sKw8BtvGhd3NAk0cubt5vGicVUMJZzU7EbQLGPPxZLojhnm0HfLulmbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750817955; c=relaxed/simple; bh=dWh0/EH5ArW5m3vgnbw1/CJ18WT2/476t1InypmGfXI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=S0/MBSC8YioEyLh8dNXyvmz3QjWxOOXD+8Q1mFg3jsUUAqyFnHwp3VkpkttyQOPulz+Sc0LGYKoGyKtFYHQM5OeUf5m50h6ge2DDsJwOrJC0w+yCnLgQST1Zif8ODqG4I2j2rDmQLFcD2PaFoVWpIiQMUq5+/4V0bc1hSwoilN4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF2493858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1750817954; 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=yiE29gW83wnUrXd8FQdPerY7XnJoQQ18NCbnhQdgP10=; b=d2+8f7mxKlcisDeG/qkYmRsw90ruVW2nl1NOp/YiGG5tF94Br+dVC27TfFVCV6Wg7shPBr Q24T0A7wPOPopgjh5ZXAaKOBD295NaqTYG6rP7EFYES2CBYdSBCh2YoJRga5BWvX2+Z3dV L89Ir8+4Nc/PEWeVFdgQpHekvHssU0M= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-137-36MV36hgPp2aV_OXyTDh2g-1; Tue, 24 Jun 2025 22:19:12 -0400 X-MC-Unique: 36MV36hgPp2aV_OXyTDh2g-1 X-Mimecast-MFC-AGG-ID: 36MV36hgPp2aV_OXyTDh2g_1750817951 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9547319560B6; Wed, 25 Jun 2025 02:19:11 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.80.61]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 91FA619560A3; Wed, 25 Jun 2025 02:19:10 +0000 (UTC) Date: Tue, 24 Jun 2025 19:19:03 -0700 From: Kevin Buettner To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/dwarf2: Add symbols for function declarations Message-ID: <20250624191903.1dcfdf16@f41-zbm-amd> In-Reply-To: <87frfpyy0k.fsf@tromey.com> References: <20250613044224.611229-1-kevinb@redhat.com> <87frfpyy0k.fsf@tromey.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: VAa8zGUFB9EMs-6y1nMZ0ECQmNxGlCgG25gAdVTb1nA_1750817951 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 Tue, 24 Jun 2025 09:12:11 -0600 Tom Tromey wrote: > >>>>> "Kevin" == Kevin Buettner writes: > > Kevin> This commit was motivated by comments 3 and 4 for bug 31563: > Kevin> https://sourceware.org/bugzilla/show_bug.cgi?id=31563#c3 > > I didn't really read through this yet, but in general a patch to add a > new (non-local) full symbol that doesn't have a corresponding change to > the indexer seems like it will be incorrect. The issue is that lookups > will only work if the CU has already been expanded; and with my > long-suffering search-via-the-index series, the lookups will fail > entirely. Do you think that a function declaration (where, in GDB's symbol table, the address class is LOC_UNRESOLVED) should be added to the index? These symbols don't have addresses associated with them, though the address can be obtained from the minsyms. One of the things that I had to do while looking at and fixing the various regressions that I encountered was to make various parts of gdb NOT use the function declaration symbols, or, at least prefer other symbols over the ones for declarations. E.g. they had to be removed in order for "info func" to continue working as before. If you think it's needed, I'll take a look, but I'd guess that if I add them for indexing purposes, other bits of code might have to be adjusted to later remove them. Kevin