From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 70ADC3858C62 for ; Thu, 18 Jan 2024 20:32:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70ADC3858C62 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 70ADC3858C62 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=1705609933; cv=none; b=C9edSp+BIy1jW5uLunOgBDB03JTIbbunKLb1AF+w7dSsQIzs1F2u5L+eJAr5A2LsWyg2LBZUxRLRpS4fvmxDhJXsgUcPwzEFV9QGQXDkNFVM1OquM8Bvp9HZKWm1wZFZVFRpU2C6p4LT44QvPSRnf0YotghC99NdnyQiVyZGGLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705609933; c=relaxed/simple; bh=vKG0TKuYvHcBIvUecFme1asZywgtdaZIWDNihvHtHR0=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=MIpIYigFYRUZwm2niHFxZ4qH8z1Qup5mz/80MFc+lIlYhbdS3NX9yF23eCocUKn1ACvIFjY6irLvxXjuK70BtP/RVsHhPYMrxeuHp95/+xOzVcs2CuvaBeMO49M5rCkppaJYGJESmCzvRpt9rioKtpvDsUeD8dYE9s0KDNrWwVg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6008a.ext.cloudfilter.net ([10.0.30.227]) by cmsmtp with ESMTPS id QPBrrQ3fOTHHuQZ3Yr9Wvi; Thu, 18 Jan 2024 20:32:08 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id QZ3XrEcC4ZKctQZ3XrDY50; Thu, 18 Jan 2024 20:32:08 +0000 X-Authority-Analysis: v=2.4 cv=a+kjSGeF c=1 sm=1 tr=0 ts=65a98ac8 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=dEuoMetlWLkA:10 a=Qbun_eYptAEA:10 a=B_Tv2JfvxkIVyvo0GuEA:9 a=QEXdDO2ut3YA:10 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=W11NdvI7zzadwPpCtCumXC4VUgMZHAZ5bJy2AV6YWHU=; b=EXzmH98jpBhf1BokDrKsbSWEfb +t32/0w+5+oL0XpoDV31mzjfEvcNdvOs6OC8JdwtdkdFqLvWhxS3ZfrBTJDWROHuZgYjacj6oQsTt Hj0bdllubPoW8AzsLFO9a9dkA; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:50746 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rQZ3X-002DCj-1A for gdb-patches@sourceware.org; Thu, 18 Jan 2024 13:32:07 -0700 From: Tom Tromey Date: Thu, 18 Jan 2024 13:32:00 -0700 Subject: [PATCH v2 02/30] Small cleanup in DWARF reader MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240118-submit-domain-hacks-2-v2-2-aecab29fa104@tromey.com> References: <20240118-submit-domain-hacks-2-v2-0-aecab29fa104@tromey.com> In-Reply-To: <20240118-submit-domain-hacks-2-v2-0-aecab29fa104@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 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.68.157 X-Source-L: No X-Exim-ID: 1rQZ3X-002DCj-1A X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net ([192.168.0.21]) [97.122.68.157]:50746 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: MS4xfIXxX9PnhsroJnaRhnBHLBaylxSZmicZqlq7ewUfE9gQIzB2KpsLfBT+4wKakpbr0ox3jYDJyfZxrwfowNpbWO6fIxDgYXuH7g/IlRVCjNjsn7vzNTGd zqrKh5OjMG3W0t/jmMCWh+8XN7hzHIRQB75imRCqGVogvVuDJfWgozrReMwTe0zFaZ0sWEZRbzfuhlXdhqmf6ka+MOHIfJpOeak= X-Spam-Status: No, score=-3022.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I noticed a couple of spots in dwarf/read.c:new_symbol that call add_symbol_to_list. However, this function is generally written to set list_to_add, and then have a single call to add_symbol_to_list at the end. This patch cleans up this discrepancy. Note that new_symbol is overlong and should probably be split up. --- gdb/dwarf2/read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 7b523d93e07..b55b208ff4b 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -19053,7 +19053,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, sym->set_aclass_index (LOC_OPTIMIZED_OUT); sym->set_type (builtin_type (objfile)->builtin_core_addr); sym->set_domain (LABEL_DOMAIN); - add_symbol_to_list (sym, cu->list_in_scope); + list_to_add = cu->list_in_scope; break; case DW_TAG_entry_point: /* SYMBOL_BLOCK_VALUE (sym) will be filled in later by @@ -19392,7 +19392,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, case DW_TAG_common_block: sym->set_aclass_index (LOC_COMMON_BLOCK); sym->set_domain (COMMON_BLOCK_DOMAIN); - add_symbol_to_list (sym, cu->list_in_scope); + list_to_add = cu->list_in_scope; break; default: /* Not a tag we recognize. Hopefully we aren't processing -- 2.43.0