From 3a1d6f1702968c63df44f96125fb95797c6821c7 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Fri, 10 Feb 2017 14:19:23 -0800 Subject: [PATCH] riscv: Add register name to message when they do not exist. --- src/server/gdb_server.c | 8 ++++---- src/target/target.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index d7a191feb..238749630 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1166,7 +1166,7 @@ static int gdb_get_registers_packet(struct connection *connection, if (!reg_list[i]->valid) { retval = reg_list[i]->type->get(reg_list[i]); if (retval != ERROR_OK) { - LOG_DEBUG("Couldn't get register."); + LOG_DEBUG("Couldn't get register %s.", reg_list[i]->name); free(reg_packet); free(reg_list); return gdb_error(connection, retval); @@ -1234,7 +1234,7 @@ static int gdb_set_registers_packet(struct connection *connection, retval = reg_list[i]->type->set(reg_list[i], bin_buf); if (retval != ERROR_OK) { - LOG_DEBUG("Couldn't set register."); + LOG_DEBUG("Couldn't set register %s.", reg_list[i]->name); free(reg_list); free(bin_buf); return gdb_error(connection, retval); @@ -1281,7 +1281,7 @@ static int gdb_get_register_packet(struct connection *connection, if (!reg_list[reg_num]->valid) { retval = reg_list[reg_num]->type->get(reg_list[reg_num]); if (retval != ERROR_OK) { - LOG_DEBUG("Couldn't get register."); + LOG_DEBUG("Couldn't get register %s.", reg_list[reg_num]->name); free (reg_list); return gdb_error(connection, retval); } @@ -1341,7 +1341,7 @@ static int gdb_set_register_packet(struct connection *connection, retval = reg_list[reg_num]->type->set(reg_list[reg_num], bin_buf); if (retval != ERROR_OK){ - LOG_DEBUG("Couldn't set register."); + LOG_DEBUG("Couldn't set register %s.", reg_list[reg_num]->name); free(bin_buf); free(reg_list); return gdb_error(connection, retval); diff --git a/src/target/target.c b/src/target/target.c index a8be18ee7..42a8caca8 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2703,8 +2703,8 @@ COMMAND_HANDLER(handle_reg_command) if (reg->valid == 0) { retval = reg->type->get(reg); if (retval != ERROR_OK) { - LOG_DEBUG("Couldn't get register."); - return retval; + LOG_DEBUG("Couldn't get register %s.", reg->name); + return retval; } } value = buf_to_str(reg->value, reg->size, 16); @@ -2722,7 +2722,7 @@ COMMAND_HANDLER(handle_reg_command) retval = reg->type->set(reg, buf); if (retval != ERROR_OK) { - LOG_DEBUG("Couldn't set register."); + LOG_DEBUG("Couldn't set register %s.", reg->name); free (buf); return retval; }