From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GAN8Kp/4AWraIDAAWB0awg (envelope-from ) for ; Mon, 11 May 2026 11:41:19 -0400 Received: by simark.ca (Postfix, from userid 112) id 9EE1A1E0C3; Mon, 11 May 2026 11:41:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, 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 0181C1E067 for ; Mon, 11 May 2026 11:41:19 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E8D84BB1C19 for ; Mon, 11 May 2026 15:41:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E8D84BB1C19 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 11CF64B99F50 for ; Mon, 11 May 2026 15:40:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11CF64B99F50 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11CF64B99F50 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778514056; cv=none; b=HC9CzE1JQoG3yI9p3nyjUiwijuV/U5+E1Mu/vrIhFBTFJDdQTyrh+HY23yeiRmI1cHC/+3vAqyUT7J0LEutyX7TpvxoWyEF8j03RN7UsfkvuaoWC7e4dpiMe7qjtyj11nZ4z3zBvUCv1adCgrTmPzKPhEMF/M2eD/G0M+I1Y4Es= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778514056; c=relaxed/simple; bh=A0kApgA2GbzqLnjeYb9ITKeSSPEUYkPgO+YuXZ/jurU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=dOMl6TMY5JPxx1o8wKetQ/zQJ8xlD7eJEvhQ4lfCDl4v7LUc+OoXqJSPF1WvPpGxJYC20Hq3HgLGEG7sAngYZKJ8S10lYxJ9KHjYsdKQrngW9J81cF8K7lccbO2W+80KgBVzBbXTJS14eb7fhXDNk6jFDpNqpcIhHCfHTHYINro= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11CF64B99F50 Received: by simark.ca (Postfix) id 1ADBC1E0C3; Mon, 11 May 2026 11:40:54 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi , Tom Tromey Subject: [PATCH v3 2/7] gdb/dwarf: move dwarf2_cu::section to cu.c Date: Mon, 11 May 2026 11:40:28 -0400 Message-ID: <20260511154053.142576-3-simon.marchi@efficios.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511154053.142576-1-simon.marchi@efficios.com> References: <20260511154053.142576-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Following the previous patch that moves the dwo_unit structure from dwarf2/read.c to dwarf2/dwo.h, dwarf2_cu::section has no reason to be implemented in dwarf2/read.c anymore. Move it to dwarf2/cu.c. Change-Id: I67e2bb42d878ac18e4bf3460d75f1394477a46ce Approved-By: Tom Tromey --- gdb/dwarf2/cu.c | 11 +++++++++++ gdb/dwarf2/read.c | 14 +------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c index c3bfd15f14a1..3c89bd960d56 100644 --- a/gdb/dwarf2/cu.c +++ b/gdb/dwarf2/cu.c @@ -58,6 +58,17 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu *per_cu, dwarf2_per_objfile *per_objfile) /* See cu.h. */ +const dwarf2_section_info & +dwarf2_cu::section () const +{ + if (this->dwo_unit != nullptr) + return *this->dwo_unit->section; + else + return *this->per_cu->section (); +} + +/* See cu.h. */ + struct type * dwarf2_cu::addr_sized_int_type (bool unsigned_p) const { diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 46aa0201cc63..4d797b0e29b9 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -5765,19 +5765,7 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu) } } -/* See cu.h. - - This function is defined in this file (instead of cu.c) because it needs - to see the definition of struct dwo_unit. */ - -const dwarf2_section_info & -dwarf2_cu::section () const -{ - if (this->dwo_unit != nullptr) - return *this->dwo_unit->section; - else - return *this->per_cu->section (); -} +/* See cu.h. */ /* See cu.h. -- 2.54.0