riscv: Add register name to message when they do not exist.

This commit is contained in:
Megan Wachs 2017-02-10 14:19:23 -08:00
parent 7b95554ff5
commit 3a1d6f1702
2 changed files with 7 additions and 7 deletions

View File

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

View File

@ -2703,7 +2703,7 @@ COMMAND_HANDLER(handle_reg_command)
if (reg->valid == 0) {
retval = reg->type->get(reg);
if (retval != ERROR_OK) {
LOG_DEBUG("Couldn't get register.");
LOG_DEBUG("Couldn't get register %s.", reg->name);
return retval;
}
}
@ -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;
}