From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0BK2HPLHmGklMAMAWB0awg (envelope-from ) for ; Fri, 20 Feb 2026 15:45:38 -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=AJUuY7Bq; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 62EC71E0BA; Fri, 20 Feb 2026 15:45:38 -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 B09251E08D for ; Fri, 20 Feb 2026 15:45:37 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 433904BAD149 for ; Fri, 20 Feb 2026 20:45:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 433904BAD149 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=AJUuY7Bq Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 08CF14BAD15F for ; Fri, 20 Feb 2026 20:42:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08CF14BAD15F 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 08CF14BAD15F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771620167; cv=none; b=vfCPEijun2XvQLuFjSdYfRz4HWF9xot3RAy+yDUMUnmfBXgghBr0rRoLlefizgRPT2+fw42Tp0dNLAeKLMfneSo8rvUBROVDn51NqT7tZ6zOol4ojASAIL06XJAVLICFAr21GdIJMYsUadZgYwFpYmRg/wpB8PHVLyAjQ4P1nVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771620167; c=relaxed/simple; bh=G4ztso8WavQLbpRLbZpDNJ6iqFG/nh3DUrr09njtTAk=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=u/Rk8QUB17INOtjkzJaZadag6LsORA98hTGa2V+pq9uW7Ht2EkLt829WyvcgnGuT9XIY4iyh9EINcJ6+h7cernlWwrIYwE0XnDP7F6hOdB6LBDX2ql8MJQ/YQrcwKihGnBsOcBWDwwc1jDn/uXgSa5v8m+FtRs7/j4CPF45+jQU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08CF14BAD15F Received: from eig-obgw-6005b.ext.cloudfilter.net ([10.0.30.162]) by cmsmtp with ESMTPS id tOIJvjrBGVCBNtXKovNEsw; Fri, 20 Feb 2026 20:42:46 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id tXKTvjZskHSQMtXKTvaolx; Fri, 20 Feb 2026 20:42:25 +0000 X-Authority-Analysis: v=2.4 cv=GIQIEvNK c=1 sm=1 tr=0 ts=6998c745 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A: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=b3mbxqSa5WMJYvhyRYJLp0q1sltl9u1aFwP0PG+MrFo=; b=AJUuY7Bqg45cU1vek/jassgTfs jGIdgBZ/he86Enkg23v50SCkoFbsfuUqBStslHczB7pS9eHdiMdcfJpXiVF5Wp9nDNHUupSanRh76 +16vTf8zWrDP4X/OkosbhjZll; Received: from 97-122-122-234.hlrn.qwest.net ([97.122.122.234]:49908 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 1vtXKS-00000000Jtq-3YyG; Fri, 20 Feb 2026 13:42:24 -0700 From: Tom Tromey Date: Fri, 20 Feb 2026 13:42:25 -0700 Subject: [PATCH v3 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: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-5-98ae8ab28fab@tromey.com> References: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-0-98ae8ab28fab@tromey.com> In-Reply-To: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-0-98ae8ab28fab@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: 1vtXKS-00000000Jtq-3YyG 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]:49908 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfBrASi99bOD7Rp8VmrKwIa/Ir85MoriAv341Ro8MZTt++vpgmpV2uav9NjWHxEgDcCXPhv/CQpOFnY5gYI9TEobgn65aHsaNkML44s+7/2B9apXMhCDN VpySBUnS/RDYty+qaLs+YKg9aax149lLpibc6fuSu17ixfNgiXM5qm+jBm0GecAoSfB+jR/iUP01bFV+5iMvbRypgkYUUBJo4qE= 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 184ffe1c213..141a6ea066f 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -4886,15 +4886,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