From b9b7c4ac809c24e9683d964fd9c0af9e66f784cc Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Fri, 1 Oct 2021 00:56:17 -0400 Subject: [PATCH] GDBStub: Add support for the T command --- Source/Core/Core/PowerPC/GDBStub.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 6686b4722b..5752e53217 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -309,7 +309,15 @@ static void gdb_handle_query() static void gdb_handle_set_thread() { if (memcmp(cmd_bfr, "Hg0", 3) == 0 || memcmp(cmd_bfr, "Hc-1", 4) == 0 || - memcmp(cmd_bfr, "Hc0", 4) == 0 || memcmp(cmd_bfr, "Hc1", 4) == 0) + memcmp(cmd_bfr, "Hc0", 3) == 0 || memcmp(cmd_bfr, "Hc1", 3) == 0) + return gdb_reply("OK"); + gdb_reply("E01"); +} + +static void gdb_handle_thread_alive() +{ + if (memcmp(cmd_bfr, "T0", 2) == 0 || memcmp(cmd_bfr, "T1", 4) == 0 || + memcmp(cmd_bfr, "T-1", 3) == 0) return gdb_reply("OK"); gdb_reply("E01"); } @@ -709,6 +717,9 @@ void gdb_handle_exception(bool loop_until_continue) case 'H': gdb_handle_set_thread(); break; + case 'T': + gdb_handle_thread_alive(); + break; case '?': gdb_handle_signal(); break;