From 051197b83c935e82a254405ad1df24c6a7013a44 Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Mon, 27 Dec 2021 08:23:54 -0500 Subject: [PATCH] GDB Stub: fix thread report requests We are always reporting thread 1 existing and also fix an issue with a wrong memcmp size --- Source/Core/Core/PowerPC/GDBStub.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 530c9cdecb..d1eca5d7bf 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -327,16 +327,16 @@ static void HandleQuery() static void HandleSetThread() { - if (memcmp(s_cmd_bfr, "Hg0", 3) == 0 || memcmp(s_cmd_bfr, "Hc-1", 4) == 0 || - memcmp(s_cmd_bfr, "Hc0", 3) == 0 || memcmp(s_cmd_bfr, "Hc1", 3) == 0) + if (memcmp(s_cmd_bfr, "Hg-1", 4) == 0 || memcmp(s_cmd_bfr, "Hc-1", 4) == 0 || + memcmp(s_cmd_bfr, "Hg0", 3) == 0 || memcmp(s_cmd_bfr, "Hc0", 3) == 0 || + memcmp(s_cmd_bfr, "Hg1", 3) == 0 || memcmp(s_cmd_bfr, "Hc1", 3) == 0) return SendReply("OK"); SendReply("E01"); } static void HandleIsThreadAlive() { - if (memcmp(s_cmd_bfr, "T0", 2) == 0 || memcmp(s_cmd_bfr, "T1", 4) == 0 || - memcmp(s_cmd_bfr, "T-1", 3) == 0) + if (memcmp(s_cmd_bfr, "T1", 2) == 0 || memcmp(s_cmd_bfr, "T-1", 3) == 0) return SendReply("OK"); SendReply("E01"); }