]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
GDB, gdbserver: Convert regcache_register_size function to method
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Sat, 2 Nov 2024 02:56:21 +0000 (23:56 -0300)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 8 Jan 2025 17:11:59 +0000 (12:11 -0500)
commitd70701731d1e3d9b6e87808f853b40e997ba0454
tree670cf84f2e76c15b9ee6ac26af36ebfe3876cfc0
parent1da36057976ea565045f319e3d65be7412ca0588
GDB, gdbserver: Convert regcache_register_size function to method

The regcache_register_size function has one implementation in GDB, and
one in gdbserver.  Both of them have a gdb::checked_static_cast to their
corresponding regcache class.  This can be avoided by defining a
pure virtual register_size method in the
reg_buffer_common class, which is then implemented by the reg_buffer
class in GDB, and by the regcache class in gdbserver.

Calls to the register_size () function from methods of classes in the
reg_buffer_common hierarchy need to be changed to calls to the newly
defined method, otherwise the compiler complains that a matching method
cannot be found.

Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Reviewed-By: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Change-Id: I7f4f74a51e96c42604374e87321ca0e569bc07a3
gdb/amd64-windows-tdep.c
gdb/i387-tdep.c
gdb/nat/aarch64-hw-point.c
gdb/regcache-dump.c
gdb/regcache.c
gdb/regcache.h
gdbserver/regcache.cc
gdbserver/regcache.h
gdbsupport/common-regcache.h