This is an automated email from Gerrit.

Daniel Goehring ([email protected]) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/5208

-- gerrit

commit 106951eae1b2b61e48274df89f0b851669b44e95
Author: Daniel Goehring <[email protected]>
Date:   Thu Apr 25 11:38:04 2019 -0400

    GDB Server: Fix CPU status reporting for 'step' command
    
    The CPU status reporting is 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 eMAG 8180 Development Platform with CentOS.
    
    Change-Id: I2168d3f965a4d7cceac40bc3dcf198e413ee4fe6
    Signed-off-by: Daniel Goehring <[email protected]>

diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 6040cfb..1f69810 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -2771,9 +2771,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);
                        }
 
@@ -2831,6 +2828,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
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to