From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YRM3I9JA4WkT2hwAWB0awg (envelope-from ) for ; Thu, 16 Apr 2026 16:04:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 8B48E1E0C3; Thu, 16 Apr 2026 16:04:34 -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_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 31B591E04F for ; Thu, 16 Apr 2026 16:04:34 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id BED664C515F7 for ; Thu, 16 Apr 2026 20:04:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BED664C515F7 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0F7964BB58D2 for ; Thu, 16 Apr 2026 20:03:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F7964BB58D2 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 0F7964BB58D2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776369782; cv=none; b=HZUHxzkQAjtAPyBsomFohUMuSheoiFYcKA4UufNvinFjnmWIP6U8DunWMYLnt0+7cf0jUNnlXNDxO1eEx8ZyAqisJSCcyTGD89JUl2KYUZM6EXigIrVvEgkc+gAIGUMm3PjndAs3X2iDr9j+dRLGPTEj/nX/ETlHSDe6/JxbAA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776369782; c=relaxed/simple; bh=UTrLI4anvNt3zHGz2reSRPxKwOCqz3NBQXlLjavvN0s=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=tyY8TKJGRkQgrmoH9jvTtUy2uzvK+YHw+PemTcuJdxgRDL7ca8zZ0WtdxwVebcyOGpimYss5z4k6gmEMPcYXYG2IjMGOIuX7c0OuXUgydZDQPNQOBxW5qGd2HURkA1E1LFQYqoBZkJtekFwDsJGdUbrfjvumzgzy+YB5nsPyMpE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F7964BB58D2 Received: by simark.ca (Postfix) id 6D9BF1E0CA; Thu, 16 Apr 2026 16:02:58 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v2 3/8] gdb/dwarf: move dwarf2_cu::section to cu.c Date: Thu, 16 Apr 2026 15:59:06 -0400 Message-ID: <20260416200256.386186-4-simon.marchi@efficios.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260416200256.386186-1-simon.marchi@efficios.com> References: <20260316232042.368080-1-simon.marchi@polymtl.ca> <20260416200256.386186-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/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 45fc8435ef62..b627966a0c99 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -5807,19 +5807,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