From patchwork Sun Feb 4 19:16:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 85288 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 670053858283 for ; Sun, 4 Feb 2024 19:17:23 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id F0E1C3858CDB for ; Sun, 4 Feb 2024 19:16:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0E1C3858CDB 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 F0E1C3858CDB 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=1707074222; cv=none; b=SKtSyPcRO/t2W+142gADzrZS/+SHyItetpTVFfJkI/ibAm1YPO+k2XeULoKn5b15Xqso/nHaW9KjsvhB6wRN2RQGpQHPF6UxH3M3h6uvNsGMdupZaDU+cMrqKqubRtaxTNUweGV6sNsmHLbM/QMJmLEf/Fg9Sk/C1yq3Wau9VFY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707074222; c=relaxed/simple; bh=4zz4nA0OLOE2ZgZhZSTexk3X/0TxwMxSt+onSaPBBYg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RcbbkFjdI6W3wuqfM8qPxDkrEaoxzHSDh3o6xTc8qQW1X/841UGtGuLQG96MtEkQPWw+PrFf1iaxT3SKLc7mcZ2LjQmwOa+gpU3r4L5ngpSxgheTQG1+G9+FEqUEA7KGPGy8T7Sp1nb6rj2bkJ+1JHhZ/iposAJVlt6I7/afVQ8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5002a.ext.cloudfilter.net ([10.0.29.215]) by cmsmtp with ESMTPS id WhcKrmnxk8uLRWhz8rTJ2h; Sun, 04 Feb 2024 19:16:58 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Whz7r9OSxkg87Whz8rrTAA; Sun, 04 Feb 2024 19:16:58 +0000 X-Authority-Analysis: v=2.4 cv=M4HuKDws c=1 sm=1 tr=0 ts=65bfe2aa a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=k7vzHIieQBIA:10 a=Qbun_eYptAEA:10 a=mDV3o1hIAAAA:8 a=aIH2dCgE8dQ-nBQ_MjQA:9 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MzJzF4V0kpNbd6IeEIPaCNd1GoxAAPlTs366Uos3XX0=; b=b9TNB24vckpJXZSTykz5RZtrlS 4f67gp1GZ7obPyfiWrNTVO09YWWE7r6iagjMv1ryaaKag7wzhosNEv91TlKgBkTkl++NPO6pBQr3q aAZWi5WW98RgrW+P4+uTFnThA; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:41600 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rWhz7-000JNs-1d; Sun, 04 Feb 2024 12:16:57 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Remove remnants of partial DIEs from DWARF reader Date: Sun, 4 Feb 2024 12:16:46 -0700 Message-ID: <20240204191646.4008184-1-tom@tromey.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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.68.157 X-Source-L: No X-Exim-ID: 1rWhz7-000JNs-1d X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net (localhost.localdomain) [97.122.68.157]:41600 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfP5njXojQs8zJ+xrG/AVPRyOGV1nhezhsUWmTCm/Hl92v8Z1GYggePPozXW2Swe+nEsZmRn3rGx/J1PtUOthE0Yow+J39sJm94st0a+nKh4YvTvY+QDc NPP1RfSOddLV64wAfCecXsJlkDRhpYoTWyRrujBKSdYsleHv4VDJodDmawcWDlumbWQQXFkgb9iyyhKZO4qspZhuZC+Al6H9YlQ= X-Spam-Status: No, score=-3022.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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+patchwork=sourceware.org@sourceware.org When rewriting the DWARF scanner, I forgot to remove dwarf2_cu::load_all_dies and dwarf2_cu::partial_dies. This patch corrects the oversight and fixes up a couple other spots that mention partial DIEs, which no longer exist. --- gdb/dwarf2/cu.c | 3 +-- gdb/dwarf2/cu.h | 14 ++------------ gdb/dwarf2/read.c | 5 ++--- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c index a1675b0d313..ae46dd2a9b2 100644 --- a/gdb/dwarf2/cu.c +++ b/gdb/dwarf2/cu.c @@ -42,8 +42,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu, producer_is_clang (false), producer_is_gas_lt_2_38 (false), producer_is_gas_2_39 (false), - processing_has_namespace_info (false), - load_all_dies (false) + processing_has_namespace_info (false) { } diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h index d14397380de..ad89228ef8d 100644 --- a/gdb/dwarf2/cu.h +++ b/gdb/dwarf2/cu.h @@ -136,12 +136,8 @@ struct dwarf2_cu distinguish these in buildsym.c. */ struct pending **list_in_scope = nullptr; - /* Hash table holding all the loaded partial DIEs - with partial_die->offset.SECT_OFF as hash. */ - htab_t partial_dies = nullptr; - - /* Storage for things with the same lifetime as this read-in compilation - unit, including partial DIEs. */ + /* Storage for things with the same lifetime as this read-in + compilation unit. */ auto_obstack comp_unit_obstack; /* Backlink to our per_cu entry. */ @@ -274,12 +270,6 @@ struct dwarf2_cu bool processing_has_namespace_info : 1; - /* This flag will be set when reading partial DIEs if we need to load - absolutely all DIEs for this compilation unit, instead of just the ones - we think are interesting. It gets set if we look for a DIE in the - hash table and don't find it. */ - bool load_all_dies : 1; - /* Get the buildsym_compunit for this CU. */ buildsym_compunit *get_builder (); }; diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index e873d9cc440..c92554c929d 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -25,8 +25,7 @@ along with this program. If not, see . */ /* FIXME: Various die-reading functions need to be more careful with - reading off the end of the section. - E.g., load_partial_dies, read_partial_die. */ + reading off the end of the section. */ #include "defs.h" #include "dwarf2/read.h" @@ -21490,7 +21489,7 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off, if (this_cu->is_dwz != offset_in_dwz || this_cu->sect_off > sect_off) { if (low == 0 || this_cu->is_dwz != offset_in_dwz) - error (_("Dwarf Error: could not find partial DIE containing " + error (_("Dwarf Error: could not find CU containing " "offset %s [in module %s]"), sect_offset_str (sect_off), bfd_get_filename (per_bfd->obfd));