On 2/21/23 12:52, Alex Bennée wrote:
This is a hangover from the original code. addr is misleading as it is
only really a register id. While len will never exceed
MAX_PACKET_LENGTH I've used size_t as that is what strlen returns.
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
---
v3
- fix commit message
- use unsigned for regid
Don't use unsigned, which you did here:
static void handle_write_all_regs(GArray *params, void *user_ctx)
{
- target_ulong addr, len;
+ unsigned int reg_id;
but not here
static void handle_read_all_regs(GArray *params, void *user_ctx)
{
- target_ulong addr, len;
+ int reg_id;
because the comparison,
+ for (reg_id = 0; reg_id < gdbserver_state.g_cpu->gdb_num_g_regs; reg_id++)
{
is against signed:
include/hw/core/cpu.h:377: int gdb_num_g_regs;
r~