From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.143.40]) by sourceware.org (Postfix) with ESMTPS id 790D8385840E for ; Thu, 26 Aug 2021 02:19:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 790D8385840E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tromey.com Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 3AE99290B3 for ; Wed, 25 Aug 2021 21:19:40 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id J4zUmDkDZK61iJ4zUmEqHY; Wed, 25 Aug 2021 21:19:40 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: 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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hG0T40J1htjbuifJEjUCpQdMW4CQk9Ca7cQNgcSPMjo=; b=kbU9Qo5YsDyuoBejp4KLwCekhY 0cFiDjpB/Pxa1wUVAb3339sdDZLYuScvaGyPx3oTkfakmc7EmwnwGWbNHsuTqlGqNh7mdYpiJkQ14 x5kdeV7CY+qPxMCn9VOUkE1XV; Received: from 97-122-86-84.hlrn.qwest.net ([97.122.86.84]:46876 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mJ4zT-003LSg-W2; Wed, 25 Aug 2021 20:19:40 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 03/30] Add dwarf2_per_cu_data::addresses_seen Date: Wed, 25 Aug 2021 20:19:10 -0600 Message-Id: <20210826021937.1490292-4-tom@tromey.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210826021937.1490292-1-tom@tromey.com> References: <20210826021937.1490292-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.86.84 X-Source-L: No X-Exim-ID: 1mJ4zT-003LSg-W2 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-86-84.hlrn.qwest.net (localhost.localdomain) [97.122.86.84]:46876 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3030.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2021 02:19:51 -0000 This adds a new member to dwarf2_per_cu_data that indicates whether addresses have been seen for this CU. This is then set by the .debug_aranges reader. The idea here is to detect when a CU does not have address information, so that the new indexer will know to do extra scanning in that case. --- gdb/dwarf2/read.c | 2 ++ gdb/dwarf2/read.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index e418307ee99..a772a16c64c 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2741,6 +2741,8 @@ read_addrmap_from_aranges (dwarf2_per_objfile *per_objfile, - baseaddr); addrmap_set_empty (mutable_map, start, end - 1, per_cu); } + + per_cu->addresses_seen = true; } return true; diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index b57e1f95c45..a0eab3500ec 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -103,6 +103,7 @@ struct dwarf2_per_cu_data reading_dwo_directly (false), tu_read (false), m_header_read_in (false), + addresses_seen (false), unit_type {}, lang (language_unknown) { @@ -153,6 +154,10 @@ struct dwarf2_per_cu_data it private at the moment. */ mutable bool m_header_read_in : 1; + /* If addresses have been read for this CU (usually from + .debug_aranges), then this flag is set. */ + bool addresses_seen : 1; + /* The unit type of this CU. */ ENUM_BITFIELD (dwarf_unit_type) unit_type : 8; -- 2.31.1