aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Blaicher <matthias@blaicher.com>2012-10-23 16:53:16 +0200
committerPeter Stuge <peter@stuge.se>2012-10-28 01:32:35 +0000
commit442a684303b7cc0c33430490612e1bf70a4a3d63 (patch)
tree62d724e8efade411b50b98e3d096ee5a41399ef9
parent3a6ac237163b9a2c480c020064aabf4c2b199543 (diff)
downloadriscv-openocd-442a684303b7cc0c33430490612e1bf70a4a3d63.zip
riscv-openocd-442a684303b7cc0c33430490612e1bf70a4a3d63.tar.gz
riscv-openocd-442a684303b7cc0c33430490612e1bf70a4a3d63.tar.bz2
rtos: fix gdb qC command answer
rtos->current_thread is of type int64_t. All other commands already respect this. Change-Id: I9951946ff2a09c53cd78c6ab882c80cdd2ab7ac6 Signed-off-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-on: http://openocd.zylin.com/917 Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
-rw-r--r--src/rtos/rtos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 8e2b568..00025ab 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -344,9 +344,9 @@ int rtos_thread_packet(struct connection *connection, char *packet, int packet_s
return ERROR_OK;
} else if (strstr(packet, "qC")) {
if (target->rtos != NULL) {
- char buffer[15];
+ char buffer[19];
int size;
- size = snprintf(buffer, 15, "QC%08X", (int)target->rtos->current_thread);
+ size = snprintf(buffer, 19, "QC%016" PRIx64, target->rtos->current_thread);
gdb_put_packet(connection, buffer, size);
} else
gdb_put_packet(connection, "QC0", 3);