Add detail to `wrong register size` error.

Signed-off-by: Tim Newsome <tim@sifive.com>
Change-Id: Id31499c94b539969970251145e42c89c943fd87c
Reviewed-on: http://openocd.zylin.com/4577
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Tim Newsome 2018-06-25 13:44:01 -07:00 committed by Matthias Welwarsky
parent 527113ad2b
commit fd0446002f
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}