From 75d7dd32d137321d49ff56792b5a7bcf524e0e4b Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 20 Jul 2022 01:22:25 +0100 Subject: [PATCH] gdb_main: Implemented H[m|M|g|G|c] packet support --- src/gdb_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gdb_main.c b/src/gdb_main.c index fc8d723..fda3713 100644 --- a/src/gdb_main.c +++ b/src/gdb_main.c @@ -166,6 +166,19 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall) gdb_putpacketz("OK"); break; } + /* '[m|M|g|G|c][thread-id]' : Set the thread ID for the given subsequent operation + * (we don't actually care which as we only care about the TID for whether to send OK or an error) + */ + case 'H': { + char operation = 0; + uint32_t thread_id = 0; + sscanf(pbuf, "H%c%" SCNx32, &operation, &thread_id); + if (thread_id <= 1) + gdb_putpacketz("OK"); + else + gdb_putpacketz("E01"); + break; + } case 's': /* 's [addr]': Single step [start at addr] */ single_step = true; /* fall through */