From: Alan Bowman Date: Mon, 23 May 2011 19:37:58 +0000 (+0100) Subject: Report actual current thread X-Git-Tag: v0.5.0-rc1~56 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=212db44fcf56de16baaa6ee78e2f459e185db653;hp=a57daf23db62738754c309dfcda0f4f3cfa62fa6 Report actual current thread --- diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 9eed08e0e1..818a97937a 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -453,7 +453,17 @@ int gdb_thread_packet(struct connection *connection, struct target *target, char } else if (strstr(packet, "qC")) { - gdb_put_packet(connection, "QC0", 3); + if( target->rtos!=NULL ) + { + char buffer[15]; + int size; + size = snprintf(buffer, 15, "QC%08X", (int)target->rtos->current_thread); + gdb_put_packet(connection, buffer, size); + } + else + { + gdb_put_packet(connection, "QC0", 3); + } return ERROR_OK; } else if ( packet[0] == 'T' ) // Is thread alive?