]> git.sur5r.net Git - openocd/commitdiff
rtos: fix gdb qC command answer
authorMatthias Blaicher <matthias@blaicher.com>
Tue, 23 Oct 2012 14:53:16 +0000 (16:53 +0200)
committerPeter Stuge <peter@stuge.se>
Sun, 28 Oct 2012 01:32:35 +0000 (01:32 +0000)
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>
src/rtos/rtos.c

index 8e2b568dc7d773631aa63d37293e9a6f8708fb96..00025abeef83c0222856b2666cd260aef538d774 100644 (file)
@@ -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);