From patchwork Fri Sep 27 19:50:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 98083 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 65613385DDD8 for ; Fri, 27 Sep 2024 19:51:22 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 9F9F93858D39 for ; Fri, 27 Sep 2024 19:50:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F9F93858D39 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 9F9F93858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727466655; cv=none; b=sRkD4V6f1brVqlKUSAJuPi17mXSIvguX+kW88vIUnWXsMujLpilfIM4qHVDRfMLL9zlZgsh2TavDcFegvX3OmQqJ7xpAvozQqPoEIUvxAL9/WRUDyYstR7qL22+nGU/bS9YWSrEKfUbYHgZdfwr+3QWm1QoV4ZsYgTk2pdoUepA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727466655; c=relaxed/simple; bh=MqeZNAeg2xb4iu088Xxn5Yrj7N+QuCt0ElWAVbFFga4=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=jceIRIUoIBwn96RfYRa41OpuF67p0uXGs7mvg1Jgkg+UnHpBfXZpEU/EVGmVyox9MSRdbUFrAnBnsxSsCh7V2goVxMsKfrVuVyUjGqzw2fkjQjhbpVgRBRQqGG0eFi4HO2Ei1JaraVckPK+uyqlp0cXGYRNJnKSRV1agHVArv9c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6004a.ext.cloudfilter.net ([10.0.30.197]) by cmsmtp with ESMTPS id tgyLsdB0gnNFGuGzNsZCP0; Fri, 27 Sep 2024 19:50:53 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id uGzMsL0giWdNZuGzMs8QzN; Fri, 27 Sep 2024 19:50:52 +0000 X-Authority-Analysis: v=2.4 cv=FtTO/Hrq c=1 sm=1 tr=0 ts=66f70c9c a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=EaEq8P2WXUwA:10 a=ItBw4LHWJt0A:10 a=PxALOpzp3UgT7neOzO4A:9 a=QEXdDO2ut3YA:10 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc: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=b+QdGQL0s6E33OIqklPmzc7iBNdBjgl7oiOIuVOTrCM=; b=Nbs5rPlW8LR0rKfINz8VaYxauJ Rem7Q2vGfqD71A+nABBgFhy0H75relcA9lAY0NC0XnZ0+N69TQ8lALYvrmqMVlm9Vsb8URvG+cVmD fNzhOLbyU5g4IzYX3XftzZH+K; Received: from 97-118-34-56.hlrn.qwest.net ([97.118.34.56]:49214 helo=prentzel.local) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1suGzM-000BDl-0m for gdb-patches@sourceware.org; Fri, 27 Sep 2024 13:50:52 -0600 From: Tom Tromey Date: Fri, 27 Sep 2024 13:50:51 -0600 Subject: [PATCH 3/3] Print the CU index in cooked_index::dump MIME-Version: 1.0 Message-Id: <20240927-dwarf-incl-stuff-v1-3-cb925fa76af3@tromey.com> References: <20240927-dwarf-incl-stuff-v1-0-cb925fa76af3@tromey.com> In-Reply-To: <20240927-dwarf-incl-stuff-v1-0-cb925fa76af3@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.14.2 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.118.34.56 X-Source-L: No X-Exim-ID: 1suGzM-000BDl-0m X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-34-56.hlrn.qwest.net (prentzel.local) [97.118.34.56]:49214 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfCYR3fuxPAi0RTMPOWJQBnuF1xmN3QcIfqxZgw7bkoWYE7+UbTlRVevxbZgr8K97rVXcLpXrDLOpmVaU3curZsoBaGR+hBCScl3PAubi3p0woz5yeawM o5AuIzH9I85gHagtc/oLF2C86FlDwwjp7LaCSbXOSfRsNP7NZ4g68TIghzSIk4J5oh898PU1cUTofDDcd8pcIlHDcoW/cOld4mw= X-Spam-Status: No, score=-3020.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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 While exploring a question I had about the DWARF indexer, I found I wanted to see the CU index of each entry. This patch adds this information. --- gdb/dwarf2/cooked-index.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index cf67bb6cef3a41518a41421959bf6b16bab43df0..79dc2dbd9dc1f5867bbb508ad7ebb1a616bc5eb5 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -814,6 +814,7 @@ cooked_index::dump (gdbarch *arch) gdb_printf (" DWARF tag: %s\n", dwarf_tag_name (entry->tag)); gdb_printf (" flags: %s\n", to_string (entry->flags).c_str ()); gdb_printf (" DIE offset: %s\n", sect_offset_str (entry->die_offset)); + gdb_printf (" CU index: %u\n", entry->per_cu->index); if ((entry->flags & IS_PARENT_DEFERRED) != 0) gdb_printf (" parent: deferred (%" PRIx64 ")\n",