From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway30.websitewelcome.com (gateway30.websitewelcome.com [192.185.152.11]) by sourceware.org (Postfix) with ESMTPS id CF27F394443C for ; Fri, 28 Aug 2020 16:23:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CF27F394443C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id B6740C576 for ; Fri, 28 Aug 2020 11:23:52 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id BhAOkyAH9n9FWBhAOkWbnY; Fri, 28 Aug 2020 11:23:52 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=s36J6eGa7ilSKTh1a3TdRUU8gRTd3YfiiXgWGBoL+RE=; b=f3VFIiihXwLDqa5dly4Md67r6o pAgTWmnS3N73uFbCTCpo+cDsPzoAu2r+87cYwskh/Uju7yWa1rikl2Ob+vhC489bINyhOgHOBOOJL UbHyg+Zf22OVyU369VvCYFZh8; Received: from 71-218-12-75.hlrn.qwest.net ([71.218.12.75]:33904 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kBhAO-002WJo-Cm for gdb-patches@sourceware.org; Fri, 28 Aug 2020 10:23:52 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 00/13] Use gdb_bfd_sections in more places Date: Fri, 28 Aug 2020 10:23:36 -0600 Message-Id: <20200828162349.987-1-tom@tromey.com> X-Mailer: git-send-email 2.17.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: 71.218.12.75 X-Source-L: No X-Exim-ID: 1kBhAO-002WJo-Cm X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-12-75.hlrn.qwest.net (bapiya.Home) [71.218.12.75]:33904 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3027.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2020 16:23:55 -0000 As promised, here are some patches to use gdb_bfd_sections in more places. The main motivation for this patch is that ordinary iteration is easier to understand than callback functions. Often, it is also shorter -- some patches in this series remove helper functions or helper data structures. Finally, iteration is more type-safe (at least without additional wrappers to pass function-views through bfd_map_over_sections). I did not convert every call to bfd_map_over_sections. Some of the remaining calls are not easy to test. For the calls in compile/, I have another series that makes many changes in that code, and so I didn't want to introduce clashes at this time. (I don't recall offhand if that series fixes this, but I can revisit when it lands.) As usual with these cleanups, I don't plan to commit this until the release branch is made. Let me know what you think. Tom