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
This commit is contained in:
Scott Knight 2018-11-28 11:10:31 -05:00 committed by Rafael Kitover
parent 3b185e235e
commit f385fb2faf
1 changed files with 8 additions and 1 deletions

View File

@ -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("");
}
}