aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcraigblackmore <craig.blackmore@bristol.ac.uk>2018-08-27 20:42:21 +0100
committerTim Newsome <tim@sifive.com>2018-08-27 12:42:21 -0700
commit8ede238449661581b31e09b7d328ae4d9b51406d (patch)
treedd946c4b6a9834e787780edc57b20e8270446f31 /src
parentf54eaf0b8e5b563e6906c00734d79770a5ed705f (diff)
downloadriscv-openocd-8ede238449661581b31e09b7d328ae4d9b51406d.zip
riscv-openocd-8ede238449661581b31e09b7d328ae4d9b51406d.tar.gz
riscv-openocd-8ede238449661581b31e09b7d328ae4d9b51406d.tar.bz2
Handle the qC packet (#292)
* Handle the qC packet GDB sends the qC packet to find out which thread OpenOCD is on * Correct format string for qC packet
Diffstat (limited to 'src')
-rw-r--r--src/rtos/riscv_debug.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rtos/riscv_debug.c b/src/rtos/riscv_debug.c
index fa8f13a..afb3508 100644
--- a/src/rtos/riscv_debug.c
+++ b/src/rtos/riscv_debug.c
@@ -124,6 +124,13 @@ static int riscv_gdb_thread_packet(struct connection *connection, const char *pa
return ERROR_OK;
}
+ if (strncmp(packet, "qC", 2) == 0) {
+ char rep_str[32];
+ snprintf(rep_str, 32, "QC%" PRIx64, rtos->current_threadid);
+ gdb_put_packet(connection, rep_str, strlen(rep_str));
+ return ERROR_OK;
+ }
+
return GDB_THREAD_PACKET_NOT_CONSUMED;
case 'Q':