Use registry in gdbarch
authorTom Tromey <tom@tromey.com>
Wed, 1 Jun 2022 21:31:15 +0000 (15:31 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 4 Aug 2022 19:28:04 +0000 (13:28 -0600)
commitcb275538dbddfbb3c2c372a665ac48e6f617ea33
tree7bc54ff4fc92c9b1cee74c2d7b9ae452b5ffec8b
parent8b1540430107b0752485ab9e6a841dbbacd45681
Use registry in gdbarch

gdbarch implements its own registry-like approach.  This patch changes
it to instead use registry.h.  It's a rather large patch but largely
uninteresting -- it's mostly a straightforward conversion from the old
approach to the new one.

The main benefit of this change is that it introduces type safety to
the gdbarch registry.  It also removes a bunch of code.

One possible drawback is that, previously, the gdbarch registry
differentiated between pre- and post-initialization setup.  This
doesn't seem very important to me, though.
41 files changed:
gdb/arch-utils.c
gdb/bsd-uthread.c
gdb/d-lang.c
gdb/d-lang.h
gdb/dwarf2/expr.c
gdb/dwarf2/frame.c
gdb/f-lang.c
gdb/f-lang.h
gdb/fbsd-tdep.c
gdb/frame-base.c
gdb/frame-unwind.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.py
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v3-abi.c
gdb/go-lang.c
gdb/go-lang.h
gdb/guile/scm-arch.c
gdb/guile/scm-symbol.c
gdb/ia64-libunwind-tdep.c
gdb/ia64-libunwind-tdep.h
gdb/jit.c
gdb/language.c
gdb/linux-tdep.c
gdb/m2-lang.c
gdb/m2-lang.h
gdb/netbsd-tdep.c
gdb/python/py-arch.c
gdb/python/py-registers.c
gdb/python/py-unwind.c
gdb/regcache.c
gdb/reggroups.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/solib-svr4.c
gdb/solib.c
gdb/target-descriptions.c
gdb/user-regs.c
gdb/windows-tdep.c