From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4RGPJLn8nGlE8gcAWB0awg (envelope-from ) for ; Mon, 23 Feb 2026 20:19:53 -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=kOXU1YFd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 902D91E0BA; Mon, 23 Feb 2026 20:19:53 -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 09E251E08D for ; Mon, 23 Feb 2026 20:19:53 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id CEFDB4BA23FC for ; Tue, 24 Feb 2026 01:19:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEFDB4BA23FC 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=kOXU1YFd Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 152AA4B9DB6A for ; Tue, 24 Feb 2026 01:17:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 152AA4B9DB6A 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 152AA4B9DB6A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771895821; cv=none; b=qJCJytT7yeAuAKiR0lBOHaDWARCa5v9qWc/gGpqfrosuNAxgTk40t/UNpXspQsodYaGiZ9n+EtLU92v9uhM6vDsTFMvsYgzkcX/st8FhpKc7zSYyD1qzUzTOOf0fS1gzYRQsar8e3fQ33aQIZTo7r9OR0WM+ZBlH9Bj30AZDIeg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771895821; c=relaxed/simple; bh=gPJQBqLXNRXtlSyAaGlqeXkJc5Ue92dPvg+vulYDw74=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=H2i1djT3W5e4Wll9om5A7OeKI4xzZGsT/M3yxinAaB18W40oWamvCTOifRsAXylhXz886EXU/nn6MzxClJdzrZxd50KQ4O0uTKfbXx6zBM7eJyAWXF3Z3Yo7kA5GKpmLONPcDntshu5dI+dUVlG1ZD5q57LlL6cFEcQ0cGV9zo4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 152AA4B9DB6A Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id ubA9vLZbxKXDJuh2qvHdaW; Tue, 24 Feb 2026 01:17:00 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id uh2pv1vyVcu11uh2pvIxo8; Tue, 24 Feb 2026 01:16:59 +0000 X-Authority-Analysis: v=2.4 cv=bKYWIO+Z c=1 sm=1 tr=0 ts=699cfc0b a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=ItBw4LHWJt0A:10 a=LQrQkZ2LLY0jhp4gYg0A: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=EHhV5xwPwu+zLEWRchchIlmzglXb3jTIP/KUMoGf5IM=; b=kOXU1YFd3G8TEWzclUuy44txe/ QIbXnUqvSY519pQwwHcEbkHYRcR4s+whjyuutevTKhc1YF76VRIcddsWZWPox+kkUCK9ol5awCWRN BRA6gWwWfApgTXYASv/p79sOl; Received: from 97-122-122-234.hlrn.qwest.net ([97.122.122.234]:51428 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 1vuh2o-00000000sJg-44mP; Mon, 23 Feb 2026 18:16:59 -0700 From: Tom Tromey Date: Mon, 23 Feb 2026 18:16:58 -0700 Subject: [PATCH v4 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: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-5-bf923dc5fb19@tromey.com> References: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-0-bf923dc5fb19@tromey.com> In-Reply-To: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-0-bf923dc5fb19@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.122.234 X-Source-L: No X-Exim-ID: 1vuh2o-00000000sJg-44mP X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-122-234.hlrn.qwest.net ([192.168.122.1]) [97.122.122.234]:51428 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfDTJ9G+WaqOlmdREEG95pDxQ2EGVgZ1joUWXeJT7ei6bWlChYr2QRkRILyjaL0iKobaSpfZt4/iBvaHHtjthEMGoEwoJYGkh1sx9poiGKlV56SZyyKtn aDL1awI+RFxcpSQTt9dI87YE0TNctKsAtedBCfplXk9RVVEfgtPfu3n3+q5NDRGXUNEF7LgB1Z5WIBhGntaVW3w5hXRlTV+skLE= 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 5917e697aad..e48745d7969 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -4890,15 +4890,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