This is an automated email from Gerrit. Daniel Goehring (dgoeh...@os.amperecomputing.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/6080
-- gerrit commit 050febe06ab8869a3e506c09f15272bce249f380 Author: Daniel Goehring <dgoeh...@os.amperecomputing.com> Date: Thu Apr 25 11:38:04 2019 -0400 gdb_server: Fix CPU status reporting for 'step' command The CPU status reporting was incorrect for OpenOCD's step command. The call to 'rtos_update_threads()' should be after the call to 'target_step()' and not before. With the update, 'info threads' reports the current hardware thread state. Tested on an Ampere eMAG8180 and Quicksilver silicon Change-Id: I8e9bc5f5d4ea534807a52f5bae42bb124dffbf12 Signed-off-by: Daniel Goehring <dgoeh...@os.amperecomputing.com> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 9e44287..8a371a4 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2786,9 +2786,6 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p } if (target->rtos != NULL) { - /* FIXME: why is this necessary? rtos state should be up-to-date here already! */ - rtos_update_threads(target); - target->rtos->gdb_target_for_threadid(connection, thread_id, &ct); /* @@ -2874,6 +2871,11 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p if (retval == ERROR_TARGET_NOT_HALTED) LOG_INFO("target %s was not halted when step was requested", target_name(ct)); + if (target->rtos != NULL) { + /* After executing the 'step' command, update the rtos threads */ + rtos_update_threads(target); + } + /* if step was successful send a reply back to gdb */ if (retval == ERROR_OK) { retval = target_poll(ct); -- _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel