From f385fb2faf7d8f9e3fc876597cd6197aa7a1d170 Mon Sep 17 00:00:00 2001 From: Scott Knight <4534275+knightsc@users.noreply.github.com> Date: Wed, 28 Nov 2018 11:10:31 -0500 Subject: [PATCH] Update gdb remote query support The latest version of gdb from devkitpro expects slightly different response to some of the remote queries. For instance when sending back the current thread id there should be no space or dash between 'm' and the thread id. Additionally a handful of other common remote gdb query params were added to better support current versions of gdb --- src/gba/remote.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gba/remote.cpp b/src/gba/remote.cpp index 5679ac00..5c5a43b0 100644 --- a/src/gba/remote.cpp +++ b/src/gba/remote.cpp @@ -3700,17 +3700,24 @@ void remoteMemoryRead(char* p) void remoteQuery(char* p) { if (!strncmp(p, "fThreadInfo", 11)) { - remotePutPacket("m-1"); + remotePutPacket("m1"); } else if (!strncmp(p, "sThreadInfo", 11)) { remotePutPacket("l"); } else if (!strncmp(p, "Supported", 9)) { remotePutPacket("PacketSize=1000"); + } else if (!strncmp(p, "C", 1)) { + remotePutPacket("QC1"); + } else if (!strncmp(p, "Attached", 8)) { + remotePutPacket("1"); + } else if (!strncmp(p, "Symbol", 6)) { + remotePutPacket("OK"); } else if (!strncmp(p, "Rcmd,", 5)) { p += 5; std::string cmd = HexToString(p); dbgExecute(cmd); remotePutPacket("OK"); } else { + fprintf(stderr, "Unknown packet %s\n", --p); remotePutPacket(""); } }