binutils-gdb/gdb/arch
Simon Marchi e4e20d4511 gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h
Right now, gdbsupport/common-regcache.h contains two abstractons for a
regcache.  An opaque type `regcache` (gdb and gdbserver both have their
own regcache that is the concrete version of this) and an abstract base
class `reg_buffer_common`, that is the base of regcaches on both sides.
These abstractions allow code to be written for both gdb and gdbserver,
for instance in the gdb/arch sub-directory.

However, having two
different abstractions is impractical.  If some common code has a regcache,
and wants to use an operation defined on reg_buffer_common, it can't.
It would be better to have just one.  Change all instances of `regcache
*` in gdbsupport/common-regcache.h to be `reg_buffer_common *`, then fix
fallouts.

Implementations in gdb and gdbserver now need to down-cast (using
gdb::checked_static_cast) from reg_buffer_common to their concrete
regcache type.  Some of them could be avoided by changing free functions
(like regcache_register_size) to be virtual methods on
reg_buffer_common.  I tried it, it seems to work, but I did not include
it in this series to avoid adding unnecessary changes.

Change-Id: Ia5503adb6b5509a0f4604bd2a68b4642cc5283fd
Reviewed-by: John Baldwin <jhb@FreeBSD.org>
2023-12-14 16:04:49 +00:00
..
aarch32.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
aarch32.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
aarch64-insn.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
aarch64-insn.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
aarch64-mte-linux.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
aarch64-mte-linux.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
aarch64-scalable-linux.c sme: Core file support for Linux 2023-10-04 16:23:40 +01:00
aarch64-scalable-linux.h sme2: Enable SME2 for AArch64 gdb on Linux 2023-10-04 16:23:40 +01:00
aarch64.c sme2: Enable SME2 for AArch64 gdb on Linux 2023-10-04 16:23:40 +01:00
aarch64.h sme2: Enable SME2 for AArch64 gdb on Linux 2023-10-04 16:23:40 +01:00
amd64.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
amd64.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
arc.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
arc.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
arm-get-next-pcs.c gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h 2023-12-14 16:04:49 +00:00
arm-get-next-pcs.h gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h 2023-12-14 16:04:49 +00:00
arm-linux.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
arm-linux.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
arm.c gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h 2023-12-14 16:04:49 +00:00
arm.h gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h 2023-12-14 16:04:49 +00:00
csky.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
csky.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
i386.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
i386.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
loongarch.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
loongarch.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
ppc-linux-common.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
ppc-linux-common.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
ppc-linux-tdesc.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
riscv.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
riscv.h RISC-V: Reflect actual range of vlen for hashing 2023-08-11 13:27:52 +00:00
tic6x.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
tic6x.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
xtensa.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00