From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0cdDLlPed2l/rRYAWB0awg (envelope-from ) for ; Mon, 26 Jan 2026 16:36:19 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ihq6PC1c; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B7CC41E0DD; Mon, 26 Jan 2026 16:36:19 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,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 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 349321E089 for ; Mon, 26 Jan 2026 16:36:19 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id BEDF44BC8962 for ; Mon, 26 Jan 2026 21:36:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEDF44BC8962 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ihq6PC1c Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id AD4054BA9025 for ; Mon, 26 Jan 2026 21:33:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD4054BA9025 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AD4054BA9025 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769463210; cv=none; b=wsXIGKC+gKdD/kxMEGoyeuYh+Xdb71p849ZrkM125oR+xezbzxb8btchK3qy+MU0N6T5w7hgl77TmnLCNBty0owWJfqFjc72e6BqrAFCL6CtNAa72o3+wsj/LWmaJmdp1QluwEDDwIlug1u95arP6uMTfF52W4aPU+aYcctY19g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769463210; c=relaxed/simple; bh=vviO0azcqDHomecBNNGgOojTIkK+voWnZ1t/BFuIHXA=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=LHXWltmt2RujUH4GPGSGJLS7cJ0wXwXavG+5fStZ1dO1VUFWetG5Mn27ty52iodgZPFZ1DCPwL68lFABltqZBI7MF0hRuCpB4bhPTd3KXT5i61S6XlI8QDhx85uwq3EuUQ4M59LpaqTOALIcLBMJOkToCST6N5v/7P6Q+JOWNz8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD4054BA9025 Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id kLGFvO0FGCxrGkUDCvgtWw; Mon, 26 Jan 2026 21:33:30 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id kUDBvCrSnh8QWkUDBvLp01; Mon, 26 Jan 2026 21:33:30 +0000 X-Authority-Analysis: v=2.4 cv=Mcdsu4/f c=1 sm=1 tr=0 ts=6977ddaa a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=ItBw4LHWJt0A:10 a=KoYBdgUSVh_UuqRB2NwA:9 a=QEXdDO2ut3YA:10 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PAjjLTN/uI7qmyv/YIARD4IZenKjEoz9XzD2aVIOMnc=; b=ihq6PC1cYexIaajVdDURiHzR9n E7EZ9UVb0RhJ15gR8NzS+Uxy4xnpVZyzhoo4PybuWH2RoG2M91Pd7Uye/GCwXDcx3KGZrom2jWFxj nr5hMPPCU51BT/MmJgFAnioE/; Received: from 97-122-114-32.hlrn.qwest.net ([97.122.114.32]:44294 helo=[192.168.122.1]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vkUDB-00000003cBe-1zvE; Mon, 26 Jan 2026 14:33:29 -0700 From: Tom Tromey Date: Mon, 26 Jan 2026 14:33:07 -0700 Subject: [PATCH v2 5/8] Remove C++ special case from process_imported_unit_die MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-5-8ab183d1911c@tromey.com> References: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-0-8ab183d1911c@tromey.com> In-Reply-To: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-0-8ab183d1911c@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.114.32 X-Source-L: No X-Exim-ID: 1vkUDB-00000003cBe-1zvE X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-114-32.hlrn.qwest.net ([192.168.122.1]) [97.122.114.32]:44294 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfHXyNy+R0p+aOHwdWlmMsCBGq7FVrd9mdZRzI9KYYsZ7PN2retriPCgo15Gz6nWu4TZlsgw9ptPzVEDdbV3OZP94MKYoVanpc38xz/e+GWz0dVCaoR7K IQpUhrBgGUxkmXy9SqAwgjRwe769ukw1FmZH2HwYxSNj5nVdPhPfxPauaRNunov7IVFF3PnGvU8ItmiCCoXvE0FlC1AzcNOmyUY= 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 process_imported_unit_die has a special case for C++, added as a performance improvement. While I somewhat agree with the general idea of this snippet -- importing a compilation unit seems like a strange thing to do, given that partial units exist -- I think there are two issues with it. First, it is specific to C++. I don't see any real reason that this should be the case. Second, it does not have a corresponding bit of code in the indexer. This means that the cooked index's view of the DWARF differs from the full reader's view here. This causes regressions in this series, because the indexer assumes that reading a CU will cause all the imported CUs to be read as a side effect -- but that does not happen here. I think fixing this in the indexer is not trivial. The reason for this is that the indexer works in parallel, and once a reader has acquired the "scan" bit for a CU, it is obligated to read it. However, in this case this would require making a new cooked indexer. Instead, because (1) this is weird and rare DWARF anyway, and (2) this is just a performance optimization, I propose removing this. --- gdb/dwarf2/read.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 8f2608b4607..7f6198aa4d4 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -5015,15 +5015,6 @@ process_imported_unit_die (struct die_info *die, struct dwarf2_cu *cu) dwarf2_per_cu *per_cu = dwarf2_find_containing_unit ({ §ion, sect_off }, per_objfile); - /* We're importing a C++ compilation unit with tag DW_TAG_compile_unit - into another compilation unit, at root level. Regard this as a hint, - and ignore it. This is a best effort, it only works if unit_type and - lang are already set. */ - if (die->parent && die->parent->parent == NULL - && per_cu->unit_type (false) == DW_UT_compile - && per_cu->lang (false) == language_cplus) - return; - /* If necessary, add it to the queue and load its DIEs. */ if (maybe_queue_comp_unit (cu, per_cu, per_objfile)) load_full_comp_unit (per_cu, per_objfile, false, cu->lang ()); -- 2.49.0