summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Bowman <alan.michael.bowman@gmail.com>2011-05-23 20:37:58 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-05-25 22:05:26 +0200
commit212db44fcf56de16baaa6ee78e2f459e185db653 (patch)
treea426326c8b887853da123bfd5ec5153b42cad985 /src
parenta57daf23db62738754c309dfcda0f4f3cfa62fa6 (diff)
downloadopenocd+libswd-212db44fcf56de16baaa6ee78e2f459e185db653.tar.gz
openocd+libswd-212db44fcf56de16baaa6ee78e2f459e185db653.tar.bz2
openocd+libswd-212db44fcf56de16baaa6ee78e2f459e185db653.tar.xz
openocd+libswd-212db44fcf56de16baaa6ee78e2f459e185db653.zip
Report actual current thread
Diffstat (limited to 'src')
-rw-r--r--src/rtos/rtos.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 9eed08e0..818a9793 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?