From 1c07a207e331ea9cfb1c16b2cb4d4c5fcf30a05a Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Fri, 17 Mar 2023 09:48:41 -0700 Subject: [PATCH] gdb_server: Keep working if gdb requests a non-existent reg Change-Id: Ica55a227f7df4f0606fa1ac071bca172411e9230 Signed-off-by: Tim Newsome --- src/server/gdb_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 956a34706..487be6ce6 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -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) {