From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ufKJAsMz6mpLMAwAWB0awg (envelope-from ) for ; Tue, 03 Nov 2026 14:19:31 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=j+1DjEyO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F1266378002; Tue, 03 Nov 2026 14:19:30 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 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 E6B5D1E043 for ; Tue, 03 Nov 2026 14:19:29 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 626674BA2E15 for ; Tue, 3 Nov 2026 19:19:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 626674BA2E15 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=j+1DjEyO Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 6F0A34BA23D6 for ; Tue, 3 Nov 2026 19:18:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6F0A34BA23D6 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6F0A34BA23D6 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::232 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793733526; cv=none; b=CHkzKBxJdIrg4m9SNtvQGvfM515necJX8BBQec++R8oE1//voFYqU1f+18E+DCOQgC/n5NMpA9hNlJj0gODzw+tt+Aofuk38I3lymfgWN5cN6Fp04bpx2L721yoRtxf3b9SU+11Tybn3iCk3g3laHy48jDk06yhYoA+7gYry+hs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793733526; c=relaxed/simple; bh=H0A3pP1P9Xlvcph4TQfjiiWIR0L4M94OrWph+fMhT6s=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=IuxeP5MeFTj5KghQLC0GNJpt8oxj2SIQ7jngVpoKEp5OPiPQpT+DQkCN+fkKOVJViKOWZx1RPni9XfR356lCnZ+61lu0vX8k8o7j9DR7g9pdvynGjkTqiXzBYpgJOpg3PCzl+E2xTwFgCLu1FfhQ0VRwEpt0LZkYokmY+TXhlBs= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=j+1DjEyO DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F0A34BA23D6 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-53aa0802881so2298356b6e.0 for ; Tue, 03 Nov 2026 11:18:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1793733526; x=1794338326; darn=sourceware.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=DeAihi0qFd93QLfRcZ8LKKcPV3qV34bKlVUAeFIzf2c=; b=j+1DjEyOVeAwL1o90LQJRePxwb0embVmGgejmnqptdw34+0rvIk0nNSraNnD9nV9se 2iDNflYWmxsJkDM9b/PBqpBjsK9bd/ZjQlEdtY8WOsCkbndY9LjaLnYmuQUsQhiSUekA nDclK/mppR38KP0+ne9qyT2AWZq1iqQIKDfITig+UeCsr/wRbeKlW0w9wa/D/KlZOZJf oLUGL/HkMXOhu/weayaRFLJMWee5KSpMz/tYXHGnw+wjFQVSbweKwEPhUQiOnuLvfilG DNeIfG21wDTNs2ITL858r+iRdyZIab2EMvKwjTshRQtXWEMUKc3rgLdlHuJi1Iv53r9k R+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793733526; x=1794338326; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=DeAihi0qFd93QLfRcZ8LKKcPV3qV34bKlVUAeFIzf2c=; b=Zim4FogaMtDDprJ5zoOdCZ8Lj3Ed8Htoj32ccuWqRDOWzAVHZG+GKRXGniYXlOJ5QR MZbQT372YjJGLRGlMXbUWx7ImtWikT2+vacZa5evw76cLGyH+c62iKj+/Zs9vVBTASys QZIFlLVV16u25m7+/wtD3wknzyASTKpQWHcWyFiPKkiVonCYY09UIvkNzjRcssCgOHMf 3zmp+M2EbPvjcsoaQwAj0lgVjcn2giMlBGprzmCQwxi6O5RYf02G3NtKkNv2yn9FwD9e aUHVAfpLqHpyk6vwoZCqKz5MhU+sk620Le7Lmrj5q8EZ1ADC8UA6usIjh//yGoHIKPq2 T7gQ== X-Gm-Message-State: APuU4Z9LWBx+4fp7mPbUPumMwd+RZvgOg+8q1nyOArWDwnuoD+k+WG78 mHG29nLpCLM4dDl+ZIuzhTjNqgnPqPlHs8zX1Wcv6DFRTT9+35FgGaAf0zq9LYyCLm9cTqRRvqK jeC6WRg== X-Gm-Gg: AYBFou0tOeZ/8RZ/er37yJ/OMm7CfOJG9wl+Uc0UICXCPoYCoZXUbbs0NzN3K4Gv6Gl /mFvq+I3tZiT6Mw92914oHAYeLrq9BUm91akXBOiBXDbJ3W4tr9cMsK5XwFnr7ZW3joq9EwBLr8 LWZ5J3GR1Fw4J+WY3tzMzcAGFk2/Dv7jYVAxH4GwNXo0iw1XtGDKSPjW5ZqlEO3fTTcVtevS+jn mF/SDvmp76GaQn2W/wWn3L8QuQsq8xGVM46WWSpVqevg1PVyQWVEE/4ahgV/t7mfiX9VY9CkfGO +HsvIh2OQNOQa+ckwPW9q6MtgkplJkXDj0JZwx18CLVx4iRGazUPSVtbFycOkcdD3PoAiKUSQGH 0GQn6vRVVQ3WcH50YuR2VlutvseqlW739RhFC6VVVeYjAVF9IywsJzNUpCnwAF/WcobH71O2hyQ ReskdQYWn0QxHe244lKrs064vKsFjlAnAOmDRVESlZcg+N9RASXDZjngHi2I94qFEGuHAM9lp1s USpimAc3F5r6ZLw6boi/ypc/zvaV7jpT91sptvEPpfvLDnW9c+gGWpwALjrdX/npFRlFLMmDxPd pp9bxMIoXy7r8kkq5wWbVNaiNtfG/s761/0/8vKcPetsgZscxXoVCGq3XT0462U= X-Received: by 2002:a05:6808:1710:b0:4d6:90d3:e184 with SMTP id 5614622812f47-5640dda8165mr10787120b6e.45.1793733525702; Tue, 03 Nov 2026 11:18:45 -0800 (PST) Received: from [192.168.0.26] (97-122-110-129.hlrn.qwest.net. [97.122.110.129]) by smtp.gmail.com with ESMTPSA id 5614622812f47-5640fe0d46dsm11701744b6e.11.2026.11.03.11.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 11:18:44 -0800 (PST) From: Tom Tromey Date: Tue, 03 Nov 2026 12:18:40 -0700 Subject: [PATCH 1/4] Rename array_view files MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261103-span-part-1-v1-1-133180dd43a5@adacore.com> References: <20261103-span-part-1-v1-0-133180dd43a5@adacore.com> In-Reply-To: <20261103-span-part-1-v1-0-133180dd43a5@adacore.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.15.2 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 This renames gdbsupport/array-view.h to gdbsupport/span.h, and also renames the unit test file. Minor changes were need in both files: the preprocessor symbol in span.h; and while not strictly necessary, I changed the name of the initialization function in the unit test file. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31422 --- gdb/Makefile.in | 2 +- gdb/block.h | 2 +- gdb/breakpoint.c | 2 +- gdb/breakpoint.h | 2 +- gdb/cli/cli-option.h | 2 +- gdb/cp-support.h | 2 +- gdb/displaced-stepping.h | 2 +- gdb/dwarf2/index-cache.h | 2 +- gdb/extension.h | 2 +- gdb/gdbtypes.h | 2 +- gdb/infcall.h | 2 +- gdb/regcache.h | 2 +- gdb/unittests/{array-view-selftests.c => span-selftests.c} | 4 ++-- gdb/value.c | 2 +- gdbserver/target.h | 2 +- gdbsupport/common-inferior.h | 2 +- gdbsupport/common-utils.h | 2 +- gdbsupport/pathstuff.h | 2 +- gdbsupport/selftest.h | 2 +- gdbsupport/{array-view.h => span.h} | 8 ++++---- 20 files changed, 24 insertions(+), 24 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 8cd12460000..d7ad4d033d4 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -453,7 +453,7 @@ SELFTESTS_SRCS = \ disasm-selftests.c \ gdbarch-selftests.c \ selftest-arch.c \ - unittests/array-view-selftests.c \ + unittests/span-selftests.c \ unittests/child-path-selftests.c \ unittests/cli-utils-selftests.c \ unittests/command-def-selftests.c \ diff --git a/gdb/block.h b/gdb/block.h index 8e87f9b8b23..2fc1bdea919 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -21,7 +21,7 @@ #define GDB_BLOCK_H #include "dictionary.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "gdbsupport/next-iterator.h" /* Opaque declarations. */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0f5360c4ce5..9370bc0ac26 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -79,7 +79,7 @@ #include "extension.h" #include #include "progspace-and-thread.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include #include "gdbsupport/common-utils.h" diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index ba6eb15a47e..5a70785382a 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -27,7 +27,7 @@ #include "probe.h" #include "location.h" #include -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "gdbsupport/filtered-iterator.h" #include "gdbsupport/iterator-range.h" #include "gdbsupport/refcounted-object.h" diff --git a/gdb/cli/cli-option.h b/gdb/cli/cli-option.h index b3c051253b0..99a8db2f8c7 100644 --- a/gdb/cli/cli-option.h +++ b/gdb/cli/cli-option.h @@ -21,7 +21,7 @@ #define GDB_CLI_CLI_OPTION_H #include -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "completer.h" #include #include "command.h" diff --git a/gdb/cp-support.h b/gdb/cp-support.h index 00703c52c88..dfb6865831b 100644 --- a/gdb/cp-support.h +++ b/gdb/cp-support.h @@ -24,7 +24,7 @@ #include "symtab.h" #include "gdbsupport/gdb_obstack.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include /* Opaque declarations. */ diff --git a/gdb/displaced-stepping.h b/gdb/displaced-stepping.h index c85f402e36e..e0bb77a3fff 100644 --- a/gdb/displaced-stepping.h +++ b/gdb/displaced-stepping.h @@ -20,7 +20,7 @@ #ifndef GDB_DISPLACED_STEPPING_H #define GDB_DISPLACED_STEPPING_H -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "gdbsupport/byte-vector.h" struct gdbarch; diff --git a/gdb/dwarf2/index-cache.h b/gdb/dwarf2/index-cache.h index 4307bf97cf8..9ee51137d3b 100644 --- a/gdb/dwarf2/index-cache.h +++ b/gdb/dwarf2/index-cache.h @@ -20,7 +20,7 @@ #ifndef GDB_DWARF2_INDEX_CACHE_H #define GDB_DWARF2_INDEX_CACHE_H -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" class dwarf2_per_bfd; class index_cache; diff --git a/gdb/extension.h b/gdb/extension.h index 360c788a41e..cefb7edb267 100644 --- a/gdb/extension.h +++ b/gdb/extension.h @@ -21,7 +21,7 @@ #define GDB_EXTENSION_H #include "mi/mi-cmds.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include #include "gdbtypes.h" diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 2c49b83246c..edae58754f7 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -41,7 +41,7 @@ written such that they can be used as both rvalues and lvalues. */ -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include #include "gdbsupport/enum-flags.h" #include "dwarf2.h" diff --git a/gdb/infcall.h b/gdb/infcall.h index 9074fecc364..58e40db3509 100644 --- a/gdb/infcall.h +++ b/gdb/infcall.h @@ -21,7 +21,7 @@ #define GDB_INFCALL_H #include "dummy-frame.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" struct value; struct type; diff --git a/gdb/regcache.h b/gdb/regcache.h index 66e78a7c2fb..adc1e473630 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -20,7 +20,7 @@ #ifndef GDB_REGCACHE_H #define GDB_REGCACHE_H -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "gdbsupport/common-regcache.h" #include "gdbsupport/function-view.h" #include "gdbsupport/traits.h" diff --git a/gdb/unittests/array-view-selftests.c b/gdb/unittests/span-selftests.c similarity index 99% rename from gdb/unittests/array-view-selftests.c rename to gdb/unittests/span-selftests.c index ff31912ab03..760fecf9ddc 100644 --- a/gdb/unittests/array-view-selftests.c +++ b/gdb/unittests/span-selftests.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ #include "gdbsupport/selftest.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include #include @@ -695,7 +695,7 @@ run_copy_tests () } /* namespace array_view_tests */ } /* namespace selftests */ -INIT_GDB_FILE (array_view_selftests) +INIT_GDB_FILE (span_selftests) { selftests::register_test ("array_view", selftests::array_view_tests::run_tests); diff --git a/gdb/value.c b/gdb/value.c index 6061d346dd5..6241c0b3601 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -46,7 +46,7 @@ #include "completer.h" #include "gdbsupport/cleanups.h" #include "gdbsupport/selftest.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "cli/cli-style.h" #include "expop.h" #include "inferior.h" diff --git a/gdbserver/target.h b/gdbserver/target.h index 82eab9d1243..2fe5896a9ff 100644 --- a/gdbserver/target.h +++ b/gdbserver/target.h @@ -27,7 +27,7 @@ #include "target/wait.h" #include "target/waitstatus.h" #include "mem-break.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "gdbsupport/btrace-common.h" #include #include "gdbsupport/byte-vector.h" diff --git a/gdbsupport/common-inferior.h b/gdbsupport/common-inferior.h index 4645119e451..53d78b7bc23 100644 --- a/gdbsupport/common-inferior.h +++ b/gdbsupport/common-inferior.h @@ -21,7 +21,7 @@ #ifndef GDBSUPPORT_COMMON_INFERIOR_H #define GDBSUPPORT_COMMON_INFERIOR_H -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" /* Return the exec wrapper to be used when starting the inferior, or NULL otherwise. */ diff --git a/gdbsupport/common-utils.h b/gdbsupport/common-utils.h index de83a715ac4..c6077fd3196 100644 --- a/gdbsupport/common-utils.h +++ b/gdbsupport/common-utils.h @@ -24,7 +24,7 @@ #include #include "gdbsupport/byte-vector.h" #include "gdbsupport/gdb_unique_ptr.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "poison.h" #include diff --git a/gdbsupport/pathstuff.h b/gdbsupport/pathstuff.h index 819a4bda527..0d8f7b8a1f9 100644 --- a/gdbsupport/pathstuff.h +++ b/gdbsupport/pathstuff.h @@ -21,7 +21,7 @@ #define GDBSUPPORT_PATHSTUFF_H #include "gdbsupport/byte-vector.h" -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include #include diff --git a/gdbsupport/selftest.h b/gdbsupport/selftest.h index 2a153982794..d8a1e106594 100644 --- a/gdbsupport/selftest.h +++ b/gdbsupport/selftest.h @@ -19,7 +19,7 @@ #ifndef GDBSUPPORT_SELFTEST_H #define GDBSUPPORT_SELFTEST_H -#include "gdbsupport/array-view.h" +#include "gdbsupport/span.h" #include "gdbsupport/function-view.h" #include "gdbsupport/iterator-range.h" #include diff --git a/gdbsupport/array-view.h b/gdbsupport/span.h similarity index 98% rename from gdbsupport/array-view.h rename to gdbsupport/span.h index 8431d7f5add..9708020b06a 100644 --- a/gdbsupport/array-view.h +++ b/gdbsupport/span.h @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef GDBSUPPORT_ARRAY_VIEW_H -#define GDBSUPPORT_ARRAY_VIEW_H +#ifndef GDBSUPPORT_SPAN_H +#define GDBSUPPORT_SPAN_H #include "traits.h" #include @@ -63,7 +63,7 @@ around by value. You can find unit tests covering the whole API in - unittests/array-view-selftests.c. */ + unittests/span-selftests.c. */ namespace gdb { @@ -305,4 +305,4 @@ make_array_view (U (&array)[Size]) } /* namespace gdb */ -#endif /* GDBSUPPORT_ARRAY_VIEW_H */ +#endif /* GDBSUPPORT_SPAN_H */ -- 2.56.0