From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com [192.185.45.140]) by sourceware.org (Postfix) with ESMTPS id 49BF63858404 for ; Sat, 4 Dec 2021 20:38:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 49BF63858404 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 cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 84C15400D8533 for ; Sat, 4 Dec 2021 14:38:47 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id tbnzmv0hw0ESotbnzmiKew; Sat, 04 Dec 2021 14:38:47 -0600 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=ZDcFZVj0yDZ9t5VmQBljtix8IRLvF2dl/P8YQYwQmZs=; b=Bf1hDAOa672nzexopIGCakerIP 5w21sFZ+ZOwxEaaX+u5+SM0hmDwZ1iIOwNwtZgjRpziKuTxxKvBr1Icv0sviDBGIY7y1l4NUOYdoQ NWFD+sKBYZ3HHkW60tW4Ix69O; Received: from 97-122-84-67.hlrn.qwest.net ([97.122.84.67]:51986 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 1mtbnz-000epk-B3; Sat, 04 Dec 2021 13:38:47 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v3 03/33] Add dwarf2_per_cu_data::addresses_seen Date: Sat, 4 Dec 2021 13:38:14 -0700 Message-Id: <20211204203844.1188999-4-tom@tromey.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211204203844.1188999-1-tom@tromey.com> References: <20211204203844.1188999-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.84.67 X-Source-L: No X-Exim-ID: 1mtbnz-000epk-B3 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-84-67.hlrn.qwest.net (localhost.localdomain) [97.122.84.67]:51986 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3031.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP 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: Sat, 04 Dec 2021 20:38:50 -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 1eac4d92c69..23b4fdf3cad 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2740,6 +2740,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 2f849d5f9a1..4c8441a3709 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -104,6 +104,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) { @@ -154,6 +155,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