Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] Rename gdb::array_view to gdb::span
@ 2026-11-03 19:18 Tom Tromey
  2026-11-03 19:18 ` [PATCH 1/4] Rename array_view files Tom Tromey
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Tom Tromey @ 2026-11-03 19:18 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

In the longer term, when gdb switches to C++20, I think we should
replace gdb::array_view with std::span.

This series is a first step in that direction.  It renames
gdb::array_view to gdb::span and makes a couple of other related
changes.  It also removes the operator==, in favor of a
standards-esque gdb::ranges::equal.

Note that this patch doesn't let gdb use the real std::span via an
alias.  I have done that experiment before, but it required more
extensive changes.  I thought it would be better to get the simpler
changes in first.

Regression tested on x86-64 Fedora 43.

Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Tom Tromey (4):
      Rename array_view files
      Rename gdb::array_view to gdb::span
      Rename gdb::make_array_view to gdb::make_span
      Remove operator== and operator!= from gdb::span

 gdb/Makefile.in                                    |   2 +-
 gdb/aarch64-tdep.c                                 |  18 +-
 gdb/ada-exp-parser.c                               |   2 +-
 gdb/ada-lang.c                                     |  10 +-
 gdb/ada-typeprint.c                                |   4 +-
 gdb/ada-valprint.c                                 |   4 +-
 gdb/alpha-tdep.c                                   |   2 +-
 gdb/amd-dbgapi-target.c                            |   2 +-
 gdb/amd64-tdep.c                                   |   2 +-
 gdb/amd64-windows-tdep.c                           |   6 +-
 gdb/arch/arm-get-next-pcs.c                        |   2 +-
 gdb/arm-pikeos-tdep.c                              |   2 +-
 gdb/arm-tdep.c                                     |  14 +-
 gdb/block.c                                        |   4 +-
 gdb/block.h                                        |  22 +--
 gdb/breakpoint.c                                   |  16 +-
 gdb/breakpoint.h                                   |   8 +-
 gdb/cli/cli-cmds.c                                 |   4 +-
 gdb/cli/cli-option.c                               |  16 +-
 gdb/cli/cli-option.h                               |  14 +-
 gdb/compile/compile-loc2c.c                        |  12 +-
 gdb/compile/compile-object-load.c                  |   4 +-
 gdb/compile/compile-object-run.c                   |   2 +-
 gdb/compile/compile.h                              |   4 +-
 gdb/corelow.c                                      |   2 +-
 gdb/cp-support.c                                   |   2 +-
 gdb/cp-support.h                                   |   4 +-
 gdb/dicos-tdep.c                                   |   2 +-
 gdb/disasm-selftests.c                             |   6 +-
 gdb/disasm.c                                       |   6 +-
 gdb/displaced-stepping.h                           |   4 +-
 gdb/dwarf2/attribute.h                             |   4 +-
 gdb/dwarf2/call-site.h                             |   8 +-
 gdb/dwarf2/expr.c                                  |  18 +-
 gdb/dwarf2/expr.h                                  |  16 +-
 gdb/dwarf2/frame.c                                 |   6 +-
 gdb/dwarf2/frame.h                                 |   8 +-
 gdb/dwarf2/index-cache.c                           |   6 +-
 gdb/dwarf2/index-cache.h                           |   4 +-
 gdb/dwarf2/index-write.c                           |   2 +-
 gdb/dwarf2/loc.c                                   |  40 ++--
 gdb/dwarf2/loc.h                                   |  22 +--
 gdb/dwarf2/read-debug-names.c                      |  11 +-
 gdb/dwarf2/read-gdb-index.c                        |  24 +--
 gdb/dwarf2/read-gdb-index.h                        |   4 +-
 gdb/dwarf2/read.c                                  |  52 ++---
 gdb/dwarf2/read.h                                  |   2 +-
 gdb/elfread.c                                      |   2 +-
 gdb/eval.c                                         |  12 +-
 gdb/expression.h                                   |   2 +-
 gdb/extension.c                                    |   2 +-
 gdb/extension.h                                    |   8 +-
 gdb/extract-store-integer.c                        |  14 +-
 gdb/extract-store-integer.h                        |  22 +--
 gdb/f-lang.c                                       |   4 +-
 gdb/fbsd-nat.c                                     |   2 +-
 gdb/fbsd-nat.h                                     |   2 +-
 gdb/findvar.c                                      |   4 +-
 gdb/frame-unwind.c                                 |   4 +-
 gdb/frame-unwind.h                                 |   2 +-
 gdb/frame.c                                        |  22 +--
 gdb/frame.h                                        |  18 +-
 gdb/gdb-gdb.gdb                                    |   2 +-
 gdb/gdb_bfd.c                                      |   4 +-
 gdb/gdb_bfd.h                                      |   2 +-
 gdb/gdbarch-gen.c                                  |   2 +-
 gdb/gdbarch-gen.h                                  |   4 +-
 gdb/gdbarch_components.py                          |   2 +-
 gdb/gdbthread.h                                    |   2 +-
 gdb/gdbtypes.c                                     |  12 +-
 gdb/gdbtypes.h                                     |  26 +--
 gdb/gmp-utils.c                                    |   8 +-
 gdb/gmp-utils.h                                    |  14 +-
 gdb/guile/scm-value.c                              |   2 +-
 gdb/i386-tdep.c                                    |   6 +-
 gdb/i386-tdep.h                                    |   2 +-
 gdb/i386-windows-tdep.c                            |   2 +-
 gdb/i387-tdep.c                                    |   4 +-
 gdb/ia64-tdep.c                                    |   4 +-
 gdb/infcall.c                                      |  12 +-
 gdb/infcall.h                                      |   6 +-
 gdb/inferior.h                                     |   2 +-
 gdb/jit.c                                          |   2 +-
 gdb/linux-nat.c                                    |   4 +-
 gdb/linux-nat.h                                    |   4 +-
 gdb/linux-thread-db.c                              |   4 +-
 gdb/m68k-tdep.c                                    |   4 +-
 gdb/main.c                                         |   2 +-
 gdb/minsyms.c                                      |   6 +-
 gdb/mips-tdep.c                                    |  10 +-
 gdb/nat/x86-linux.c                                |   4 +-
 gdb/nat/x86-linux.h                                |   4 +-
 gdb/netbsd-nat.c                                   |   2 +-
 gdb/netbsd-nat.h                                   |   2 +-
 gdb/objfiles.c                                     |   4 +-
 gdb/objfiles.h                                     |   2 +-
 gdb/ppc-sysv-tdep.c                                |   2 +-
 gdb/procfs.c                                       |   4 +-
 gdb/python/py-connection.c                         |   6 +-
 gdb/python/py-inferior.c                           |   4 +-
 gdb/python/py-infthread.c                          |   2 +-
 gdb/python/py-unwind.c                             |   2 +-
 gdb/python/py-value.c                              |   6 +-
 gdb/python/py-wrappers.h                           |   2 +-
 gdb/python/py-xmethods.c                           |   8 +-
 gdb/python/python.c                                |   2 +-
 gdb/ravenscar-thread.h                             |   4 +-
 gdb/regcache.c                                     |  88 ++++-----
 gdb/regcache.h                                     |  48 ++---
 gdb/remote.c                                       |  30 +--
 gdb/remote.h                                       |   6 +-
 gdb/riscv-ravenscar-thread.c                       |   2 +-
 gdb/riscv-tdep.c                                   |   2 +-
 gdb/rs6000-tdep.c                                  |   4 +-
 gdb/rust-lang.c                                    |   2 +-
 gdb/solib-darwin.c                                 |   2 +-
 gdb/solib.c                                        |   2 +-
 gdb/source.c                                       |   2 +-
 gdb/symtab.c                                       |   4 +-
 gdb/symtab.h                                       |   6 +-
 gdb/target-debug.h                                 |   6 +-
 gdb/target-delegates-gen.c                         |  44 ++---
 gdb/target.c                                       |   8 +-
 gdb/target.h                                       |  18 +-
 gdb/thread.c                                       |   2 +-
 gdb/trad-frame.c                                   |   2 +-
 gdb/trad-frame.h                                   |   6 +-
 gdb/unittests/intrusive_list-selftests.c           |   2 +-
 .../{array-view-selftests.c => span-selftests.c}   | 218 ++++++++++-----------
 gdb/utils.c                                        |   4 +-
 gdb/valarith.c                                     |  22 +--
 gdb/valops.c                                       |  38 ++--
 gdb/valprint.c                                     |   2 +-
 gdb/value.c                                        |  68 +++----
 gdb/value.h                                        |  30 +--
 gdb/windows-tdep.c                                 |   6 +-
 gdb/windows-tdep.h                                 |   4 +-
 gdb/x86-linux-nat.c                                |   4 +-
 gdb/xcoffread.c                                    |   2 +-
 gdbserver/linux-x86-low.cc                         |   4 +-
 gdbserver/regcache.cc                              |  14 +-
 gdbserver/regcache.h                               |   4 +-
 gdbserver/server.cc                                |   2 +-
 gdbserver/target.cc                                |   2 +-
 gdbserver/target.h                                 |   4 +-
 gdbsupport/buildargv.h                             |   8 +-
 gdbsupport/common-inferior.cc                      |   8 +-
 gdbsupport/common-inferior.h                       |   4 +-
 gdbsupport/common-regcache.h                       |  12 +-
 gdbsupport/common-utils.cc                         |   2 +-
 gdbsupport/common-utils.h                          |   4 +-
 gdbsupport/pathstuff.cc                            |   2 +-
 gdbsupport/pathstuff.h                             |   6 +-
 gdbsupport/remote-args.h                           |   2 +-
 gdbsupport/rsp-low.cc                              |   2 +-
 gdbsupport/rsp-low.h                               |   2 +-
 gdbsupport/selftest.cc                             |   2 +-
 gdbsupport/selftest.h                              |   4 +-
 gdbsupport/{array-view.h => span.h}                | 108 +++++-----
 159 files changed, 821 insertions(+), 822 deletions(-)
---
base-commit: 9db3b515b964c1bbdc4d20c1202fbf27719be269
change-id: 20261103-span-part-1-34e000e1fc40

Best regards,
--  
Tom Tromey <tromey@adacore.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-11-11 17:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 19:18 [PATCH 0/4] Rename gdb::array_view to gdb::span Tom Tromey
2026-11-03 19:18 ` [PATCH 1/4] Rename array_view files Tom Tromey
2026-11-10 20:07   ` Simon Marchi
2026-11-10 20:34     ` Tom Tromey
2026-11-10 20:37       ` Simon Marchi
2026-11-03 19:18 ` [PATCH 2/4] Rename gdb::array_view to gdb::span Tom Tromey
2026-11-03 19:18 ` [PATCH 3/4] Rename gdb::make_array_view to gdb::make_span Tom Tromey
2026-11-03 19:18 ` [PATCH 4/4] Remove operator== and operator!= from gdb::span Tom Tromey
2026-11-10 20:03   ` Simon Marchi
2026-11-10 20:28     ` Simon Marchi
2026-11-11 15:29       ` Tom Tromey
2026-11-11 15:46         ` Simon Marchi
2026-11-11 16:24           ` Tom Tromey
2026-11-11 16:30             ` Simon Marchi
2026-11-11 17:18               ` Tom Tromey
2026-11-11 17:19                 ` Tom Tromey
2026-11-04 14:22 ` [PATCH 0/4] Rename gdb::array_view to gdb::span Tom Tromey
2026-11-10 20:29 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox