From: Tim Newsome Date: Mon, 25 Jun 2018 20:44:01 +0000 (-0700) Subject: Add detail to `wrong register size` error. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fd0446002f89975f616c17abdb354aa5614f5f7c;p=openocd Add detail to `wrong register size` error. Signed-off-by: Tim Newsome Change-Id: Id31499c94b539969970251145e42c89c943fd87c Reviewed-on: http://openocd.zylin.com/4577 Tested-by: jenkins Reviewed-by: Tomas Vanek --- diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 2270afff..69afb2fd 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1360,7 +1360,8 @@ static int gdb_set_register_packet(struct connection *connection, int chars = (DIV_ROUND_UP(reg_list[reg_num]->size, 8) * 2); if ((unsigned int)chars != strlen(separator + 1)) { - LOG_ERROR("gdb sent a packet with wrong register size"); + LOG_ERROR("gdb sent %zu bits for a %d-bit register (%s)", + strlen(separator + 1) * 4, chars * 4, reg_list[reg_num]->name); free(bin_buf); return ERROR_SERVER_REMOTE_CLOSED; }