projects
/
fw
/
openocd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a57daf2
)
Report actual current thread
author
Alan Bowman
<alan.michael.bowman@gmail.com>
Mon, 23 May 2011 19:37:58 +0000
(20:37 +0100)
committer
Øyvind Harboe
<oyvind.harboe@zylin.com>
Wed, 25 May 2011 20:05:26 +0000
(22:05 +0200)
src/rtos/rtos.c
patch
|
blob
|
history
diff --git
a/src/rtos/rtos.c
b/src/rtos/rtos.c
index 9eed08e0e1787ab05b1f890bb2de62ddc54a226c..818a97937a6be832e69f351736bf2b062fced84f 100644
(file)
--- 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?