public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Lots of changes to gdbarch_register_name (many architectures)
@ 2022-09-01 21:31 Andrew Burgess
  2022-09-01 21:31 ` [PATCH 1/9] gdb/testsuite: rewrite capture_command_output proc Andrew Burgess
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Andrew Burgess @ 2022-09-01 21:31 UTC (permalink / raw)
  To: gdb-patches

This started with a single RISC-V test failure in
gdb.base/completion.exp.

It ended with me changing gdbarch_register_name for almost every
architecture.

The problem was the precise API for gdbarch_register_name isn't really
written down anywhere, and different bits of GDB seem to expect
slightly different things.

I used a new selftest to figure out what the most common API was, and
then brought all the other architecture into line with.
Unsurprisingly, this is basically to do what the more common / most
used / most tested architectures do (e.g. copy i386, arm, aarch64,
ppc, etc)

I've tested on x86-64, ppc, and sparc, but I've not tested most of the
architectures that I change here.

Thoughts?

Thanks,
Andrew


---

Andrew Burgess (9):
  gdb/testsuite: rewrite capture_command_output proc
  gdb/riscv: fix failure in gdb.base/completion.exp
  gdb/gdbarch: add a comment to gdbarch_register_name
  gdb: add a gdbarch_register_name self test, and fix some architectures
  gdb: check for duplicate register names in selftest
  gdb: add asserts to gdbarch_register_name
  gdb/csky: remove nullptr return from csky_pseudo_register_name
  gdb: final cleanup of various gdbarch_register_name methods
  gdb: update now gdbarch_register_name doesn't return nullptr

 gdb/alpha-tdep.c                    |   8 +--
 gdb/arch-utils.c                    |   3 +-
 gdb/avr-tdep.c                      |   6 +-
 gdb/bpf-tdep.c                      |   5 +-
 gdb/cris-tdep.c                     |   7 +-
 gdb/csky-linux-tdep.c               |  14 ++--
 gdb/csky-tdep.c                     |  20 ++----
 gdb/features/rs6000/powerpc-604.c   |  13 ++--
 gdb/features/rs6000/powerpc-604.xml |   1 -
 gdb/features/rs6000/powerpc-750.c   |   1 -
 gdb/features/rs6000/powerpc-750.xml |   1 -
 gdb/frv-tdep.c                      |   6 --
 gdb/ft32-tdep.c                     |   5 +-
 gdb/gdbarch-components.py           |  23 +++++++
 gdb/gdbarch-gen.h                   |   6 ++
 gdb/gdbarch-selftests.c             |  46 +++++++++++++
 gdb/gdbarch.c                       |   6 +-
 gdb/gdbarch.py                      |  19 ++++-
 gdb/h8300-tdep.c                    |  11 +--
 gdb/hppa-tdep.c                     |  12 ++--
 gdb/infcmd.c                        |   3 +-
 gdb/iq2000-tdep.c                   |   3 +-
 gdb/lm32-tdep.c                     |   6 +-
 gdb/m32c-tdep.c                     |   8 +--
 gdb/m32r-tdep.c                     |   5 +-
 gdb/m68hc11-tdep.c                  |   9 +--
 gdb/m68k-tdep.c                     |   9 +--
 gdb/mep-tdep.c                      |   2 +-
 gdb/mi/mi-main.c                    |  20 ++----
 gdb/microblaze-tdep.c               |   6 +-
 gdb/mips-tdep.c                     |   8 +--
 gdb/mn10300-tdep.c                  |  14 ++--
 gdb/moxie-tdep.c                    |   5 +-
 gdb/msp430-tdep.c                   |   2 +
 gdb/nds32-tdep.c                    |  10 +--
 gdb/nios2-tdep.c                    |   2 +-
 gdb/regcache.c                      |   5 +-
 gdb/reggroups.c                     |   3 +-
 gdb/riscv-tdep.c                    |  34 ++++-----
 gdb/sh-tdep.c                       | 103 +++++++++-------------------
 gdb/sparc-tdep.c                    |   8 +--
 gdb/sparc64-tdep.c                  |   8 +--
 gdb/testsuite/lib/gdb.exp           |  35 +++++++++-
 gdb/tic6x-tdep.c                    |   3 -
 gdb/tilegx-tdep.c                   |   8 +--
 gdb/tui/tui-regs.c                  |   4 +-
 gdb/user-regs.c                     |  10 +--
 gdb/v850-tdep.c                     |  14 ++--
 gdb/valops.c                        |   2 +-
 gdb/vax-tdep.c                      |   6 +-
 gdb/xstormy16-tdep.c                |   9 +--
 gdb/xtensa-tdep.c                   |   6 +-
 gdb/z80-tdep.c                      |   4 +-
 53 files changed, 280 insertions(+), 307 deletions(-)

-- 
2.25.4


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

end of thread, other threads:[~2022-10-02 16:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 21:31 [PATCH 0/9] Lots of changes to gdbarch_register_name (many architectures) Andrew Burgess
2022-09-01 21:31 ` [PATCH 1/9] gdb/testsuite: rewrite capture_command_output proc Andrew Burgess
2022-09-01 21:31 ` [PATCH 2/9] gdb/riscv: fix failure in gdb.base/completion.exp Andrew Burgess
2022-09-01 21:31 ` [PATCH 3/9] gdb/gdbarch: add a comment to gdbarch_register_name Andrew Burgess
2022-09-01 21:31 ` [PATCH 4/9] gdb: add a gdbarch_register_name self test, and fix some architectures Andrew Burgess
2022-09-01 21:31 ` [PATCH 5/9] gdb: check for duplicate register names in selftest Andrew Burgess
2022-09-01 21:31 ` [PATCH 6/9] gdb: add asserts to gdbarch_register_name Andrew Burgess
2022-09-21 18:04   ` Tom Tromey
2022-09-01 21:31 ` [PATCH 7/9] gdb/csky: remove nullptr return from csky_pseudo_register_name Andrew Burgess
2022-09-01 21:31 ` [PATCH 8/9] gdb: final cleanup of various gdbarch_register_name methods Andrew Burgess
2022-09-01 21:31 ` [PATCH 9/9] gdb: update now gdbarch_register_name doesn't return nullptr Andrew Burgess
2022-09-21 18:07 ` [PATCH 0/9] Lots of changes to gdbarch_register_name (many architectures) Tom Tromey
2022-10-02 16:28   ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).