Hello, For the OpenOCD project, I’d like to commit a change to remove the call to “rtos_update_threads()” in function gdb_handle_vcont_packet() (file gdb_server.c, line 2775), but wanted to get input from the community first.
To provide some environment background, OpenOCD is configured to communicate to a GDB client using the GDB remote serial protocol. The chip being debugged is an Ampere Computing eMAG 8180 and both OpenOCD/GDB are configured SMP multi-core with HW RTOS support enabled. The HW RTOS feature allows CPU target selection using the GDB threads command. It’s not clear to me why “rtos_update_threads()” is called here because rtos state should already be up-to-date. In addition, this routine calls “rtos_free_threadlist()” which wipes out previous thread details such as “current_threadid” and “current_thread”. In a GDB multi-cpu (SMP) debug environment, resetting current_threadid and current_thread breaks functionality on an Ampere Computing eMAG 8180 development platform. Removing the call fixes the issue I was seeing (current_threadid and current_thread values remain intact throughout the call to gdb_handle_vcont_packet()). Specifics below… File <path>/src/server/gdb_server.c, line 2775 Lines in question: -start- /* FIXME: why is this necessary? rtos state should be up-to-date here already! */ rtos_update_threads(target); -end- Thanks, Dan Goehring _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel