Re: [PATCH 10/26] gdbserver: convert registers_to_string into regcache::registers_to_string

Simon Marchi
2023-12-21T21:14:02Z

On 2/28/23 06:28, Tankut Baris Aktemur via Gdb-patches wrote:
> Convert the free `registers_to_string` function into a method of
> the regcache struct.

I'm not strongly opposed to this change, but I think that it works just
as well as a free function. Not everything working on a regcache needs
to be a method of regcache. If you imagine that all the members of
regcache are private, and it offers an interface to access the register
contents and statuses, then registers_to_string can very well be
implemented using that public interface.

Simon