From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oWVFAIOQuGmykywAWB0awg (envelope-from ) for ; Mon, 16 Mar 2026 19:21:39 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=lnW6f7yU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EC5741E0BC; Mon, 16 Mar 2026 19:21:38 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,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 7498F1E08C for ; Mon, 16 Mar 2026 19:21:38 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id E7E1A4C9175B for ; Mon, 16 Mar 2026 23:21:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7E1A4C9175B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=lnW6f7yU Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 702E64BBCDCA for ; Mon, 16 Mar 2026 23:20:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 702E64BBCDCA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 702E64BBCDCA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773703258; cv=none; b=gECj5FJoRlIgucLsqgvds5+oEelVqnv+WHarkn3+CtlaX+4sVOI5UX+SGP9NJjsFQjgnZul4/VlIpoZlWUAgC7pMju66N/OMWonvjs9lL4DPOJ6A0SNvSEriDCetVuSy+BJxlxoUmeVNIighPheLUnZEnT3UDXD2ECIqLrx0tM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773703258; c=relaxed/simple; bh=JJoW427m3Df0iqDpytr5vmnMkO0C1a8s1AMKZImH6Ds=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=npv4SBxfEnENBEPsHFcEynABjeJ74f680SEAYBg+RaG4SpEnkszTvUrTTzAIHK4uNhGdWXhVIjtOvkwH8qoIrDg68AlNuQ7KhyXocnRKzxPk7iF7ySSGCb9nvXINqSdVaNjprDEGp7O8fN5kxg/irZYhEeruiGJ7cSU4kIvNLM4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 702E64BBCDCA Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 62GNKqZr238301 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Mar 2026 19:20:56 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 62GNKqZr238301 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1773703257; bh=oxs5I76Hk2cq4YeGhU2g2cIPX/yOuFkwzMUCslfy2ck=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=lnW6f7yUa1ddCt58QLvwEKdG0smJFpFfR2/FIZn+gQMTSdkRKTwI6iZtLTy47nJzH ESAUy0sDBpAMHwtQUQ0HJZQOgh68cx/yFChlUR44ucIaMrhs6haFNsSQisFbDCfdCi WiTA4l5SzbJX+dmEeq0piYiKuxtkfVqCGtVBOWEgL92k4VXnuKpNgIeEqlBKnnhdN0 fycmh70thhonW6C4g2ffVhYtgPqh172f9h34fu5XpoHlkt5H34ILbIyJmleK6fBAT8 gDhFmHluwJEAPTfPGBYkdqPgZw6D5zJ8aYoDquZmYbH8cpXzxVHCrsUv6z8wf5+xAq CAWbwGSvagyCA== Received: by simark.ca (Postfix) id D1A2D1E0C3; Mon, 16 Mar 2026 19:20:51 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 3/8] gdb/dwarf: move dwarf2_cu::section to cu.c Date: Mon, 16 Mar 2026 19:19:21 -0400 Message-ID: <20260316232042.368080-4-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260316232042.368080-1-simon.marchi@polymtl.ca> References: <20260316232042.368080-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 16 Mar 2026 23:20:52 +0000 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 From: Simon Marchi Following the previous patch that moves the dwo_unit structure from dwarf2/read.c to dwarf2/read.h, dwarf2_cu::section has no reason to be implemented in dwarf2/read.c anymore. Move it to dwarf2/cu.c. Change-Id: I67e2bb42d878ac18e4bf3460d75f1394477a46ce --- 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 c13ea6c1622f..3a0602b4ac08 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -5806,19 +5806,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.53.0