[RFC PATCH v4 01/15] GDB, gdbserver: Convert regcache_register_size function to method

Aktemur, Tankut Baris tankut.baris.aktemur@intel.com
Fri Dec 20 14:45:35 GMT 2024


Hello Thiago,

On Saturday, November 2, 2024 3:56 AM, Thiago Jung Bauermann wrote:
> 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.

This patch looked fine to me.  Please note that there is one additional
occurrence of regcache_register_size in amd64-windows-tdep.c, which was
I think added after you wrote the patch.  I mention this, because it may
go unseen if you're not building for Windows.

Reviewed-By: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>

Thanks,
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928



More information about the Gdb-patches mailing list