Re: [PATCH v2 11/11] gdbserver: fix the declared type of register_status in regcache

Simon Marchi
2025-01-07T05:40:52Z

On 2024-12-30 05:49, Tankut Baris Aktemur wrote:
> The register_status field of regcache is declared as `unsigned char *`.
> This is incorrect, because `enum register_status` from
> gdbsupport/common-regcache.h is based on signed char and
> REG_UNAVAILABLE is defined as -1. Fix the declared type.
>
> Now that we are modifying the declaration, also use a unique_ptr
> and make the field private.
>
> The get/set methods already use the correct type, but we update cast
> operations in two places.

Oh well, you can disregard my previous comments about changing the type
of this field and making it private :). I should really find a way to
review an entire series before sending the feedback...

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon