gdb_server: Keep working if gdb requests a non-existent reg

Change-Id: Ica55a227f7df4f0606fa1ac071bca172411e9230
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2023-03-17 09:48:41 -07:00
parent 2cd3436002
commit 1c07a207e3
1 changed files with 1 additions and 1 deletions

View File

@ -1408,7 +1408,7 @@ static int gdb_get_register_packet(struct connection *connection,
if ((reg_list_size <= reg_num) || !reg_list[reg_num] ||
!reg_list[reg_num]->exist || reg_list[reg_num]->hidden) {
LOG_ERROR("gdb requested a non-existing register (reg_num=%d)", reg_num);
return ERROR_SERVER_REMOTE_CLOSED;
return gdb_error(connection, ERROR_FAIL);
}
if (!reg_list[reg_num]->valid) {