From patchwork Sun Dec 31 20:25:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 83064 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A6DC3858425 for ; Sun, 31 Dec 2023 20:27:10 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 02807385840B for ; Sun, 31 Dec 2023 20:25:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02807385840B 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 02807385840B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704054346; cv=none; b=oj4MvJUm8aqNSKn/EX+dYwYL3JiAbnFBaTpv5MU2y1bwYezfhFojMl7UV6p0xsNwwtukMQxRKNRxNbUNRunVaUKA0+xzxgC9caFNiprEtEtQbJAaRu0kbtCjjywTNwF/vQnEE7Vvu44RO5C73rWCzqln98o1+OHTIoK+w9JblVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704054346; c=relaxed/simple; bh=HABlack/ncn9NiGCfJmHoO150IgkPdDWNRRHyLvPuxw=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=NXrhfLvXiozwb2bJ0Ll+7HVEVneMGJD3V8I9/ZQ7DHcJzpDDlAZ8LGapWqBiiH6ig6CJr/ynjDATsDVwtcMF3bYIYpPsCBhLsQHCav3cJGClQz+ygeJobOERWRy+emUhWnK8jIUQLZzE/K4dhtww54GtCgO7rTZkAf2yqBC54Sg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5004a.ext.cloudfilter.net ([10.0.29.221]) by cmsmtp with ESMTPS id Jsc0rWglK8HteK2NQrpxUc; Sun, 31 Dec 2023 20:25:41 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id K2NPr9mRL11XZK2NQrrr2o; Sun, 31 Dec 2023 20:25:40 +0000 X-Authority-Analysis: v=2.4 cv=Z+v/oVdA c=1 sm=1 tr=0 ts=6591ce44 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=O8dN1M2yUwnL69gJIxIA: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=jaAeF3jveUnMs+PJMK0tg6Agn2Fb7wyy6zg1r3FnKC8=; b=LM74xiTzTsA9K0wBqTaYtHPw9y 6/cO+N4KLI6TupUFYWvU7tmbG81EY4Tn5MvwotvQMniDKF2vxCSYr58scq5J2lTQ4pbHnnkiM/x3c I9SiOBiRxqFrCwnOmhAfVXdJm; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:45228 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 1rK2NP-002PSB-1U for gdb-patches@sourceware.org; Sun, 31 Dec 2023 13:25:39 -0700 From: Tom Tromey Date: Sun, 31 Dec 2023 13:25:38 -0700 Subject: [PATCH 1/6] Make remote_fio_func_map 'const' MIME-Version: 1.0 Message-Id: <20231231-remote-fileio-v1-1-249cc6c440d9@tromey.com> References: <20231231-remote-fileio-v1-0-249cc6c440d9@tromey.com> In-Reply-To: <20231231-remote-fileio-v1-0-249cc6c440d9@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: 71.211.161.25 X-Source-L: No X-Exim-ID: 1rK2NP-002PSB-1U X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net ([192.168.0.21]) [71.211.161.25]:45228 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: MS4xfEwa3hmsZ8jYVTpF+KZCNo+bObiwXAWl1Y4gGs/30QR0YxgZxHrJPkRRYGrwM+mxkS6rExOk6hy1yHE8YZW3JXStjSFUIGUJp9ctHHWI9I/L4Yg9ePGL px7VJRub/Ne8GWRl+C5GY3KFM98RqKOSRXqVvr9pbV/4u95y+5UsekGBIZ+/tJDhFIjTkW4w+XXIUJvd1v6jmpDK6okopp2kDVk= X-Spam-Status: No, score=-3022.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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 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+patchwork=sourceware.org@sourceware.org This changes remote_fio_func_map to be const, letting it move into the readonly data section. --- gdb/remote-fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 10bc86c1ba5..367edb54f74 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -1101,7 +1101,7 @@ remote_fileio_func_system (remote_target *remote, char *buf) remote_fileio_return_success (remote, WEXITSTATUS (ret)); } -static struct { +static const struct { const char *name; void (*func)(remote_target *remote, char *); } remote_fio_func_map[] = {