[1/4] Rename array_view files
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
Commit Message
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(-)
Comments
On 11/3/26 2:18 PM, Tom Tromey wrote:
> 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
Missing one include in gdb/unittests/ranges-selftests.c.
Simon
> Missing one include in gdb/unittests/ranges-selftests.c.
This file landed after I sent the patches.
I will catch this and any other such problems when rebasing.
Tom
On 11/10/26 3:34 PM, Tom Tromey wrote:
>> Missing one include in gdb/unittests/ranges-selftests.c.
>
> This file landed after I sent the patches.
> I will catch this and any other such problems when rebasing.
>
> Tom
Ah sorry I didn't realize, I just applied you series on top of current
master.
Simon
@@ -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 \
@@ -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. */
@@ -79,7 +79,7 @@
#include "extension.h"
#include <algorithm>
#include "progspace-and-thread.h"
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include <optional>
#include "gdbsupport/common-utils.h"
@@ -27,7 +27,7 @@
#include "probe.h"
#include "location.h"
#include <vector>
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include "gdbsupport/filtered-iterator.h"
#include "gdbsupport/iterator-range.h"
#include "gdbsupport/refcounted-object.h"
@@ -21,7 +21,7 @@
#define GDB_CLI_CLI_OPTION_H
#include <optional>
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include "completer.h"
#include <string>
#include "command.h"
@@ -24,7 +24,7 @@
#include "symtab.h"
#include "gdbsupport/gdb_obstack.h"
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include <vector>
/* Opaque declarations. */
@@ -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;
@@ -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;
@@ -21,7 +21,7 @@
#define GDB_EXTENSION_H
#include "mi/mi-cmds.h"
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include <optional>
#include "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 <optional>
#include "gdbsupport/enum-flags.h"
#include "dwarf2.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;
@@ -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"
similarity index 99%
rename from gdb/unittests/array-view-selftests.c
rename to gdb/unittests/span-selftests.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "gdbsupport/selftest.h"
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include <array>
#include <vector>
@@ -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);
@@ -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"
@@ -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 <vector>
#include "gdbsupport/byte-vector.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. */
@@ -24,7 +24,7 @@
#include <vector>
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/gdb_unique_ptr.h"
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include "poison.h"
#include <string_view>
@@ -21,7 +21,7 @@
#define GDBSUPPORT_PATHSTUFF_H
#include "gdbsupport/byte-vector.h"
-#include "gdbsupport/array-view.h"
+#include "gdbsupport/span.h"
#include <sys/types.h>
#include <sys/stat.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 <set>
similarity index 98%
rename from gdbsupport/array-view.h
rename to 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 <http://www.gnu.org/licenses/>. */
-#ifndef GDBSUPPORT_ARRAY_VIEW_H
-#define GDBSUPPORT_ARRAY_VIEW_H
+#ifndef GDBSUPPORT_SPAN_H
+#define GDBSUPPORT_SPAN_H
#include "traits.h"
#include <algorithm>
@@ -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 */