From a077715b71dbe2e02561c3e33d15a0f8bc9be19a Mon Sep 17 00:00:00 2001 From: Omair Javaid Date: Thu, 31 May 2018 05:36:53 +0500 Subject: [PATCH] Fix Semihosting FileIO for targets using vcont packet This patch fixes a bug where target fails to resume after completing GDB FileIO. We need to update target last run control information to decide resumption. This was not being done for vcont packets. Change-Id: I44bea31720f8b877dba97d77a202303d546ea5bd Signed-off-by: Omair Javaid Reviewed-on: http://openocd.zylin.com/4539 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/server/gdb_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index f54db9e3..a9c2a640 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2706,6 +2706,7 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p /* simple case, a continue packet */ if (parse[0] == 'c') { + gdb_running_type = 'c'; LOG_DEBUG("target %s continue", target_name(target)); log_add_callback(gdb_log_callback, connection); retval = target_resume(target, 1, 0, 0, 0); @@ -2732,6 +2733,7 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p /* single-step or step-over-breakpoint */ if (parse[0] == 's') { + gdb_running_type = 's'; bool fake_step = false; if (strncmp(parse, "s:", 2) == 0) { -- 2.39.5