# HG changeset patch # User Michael Pavone # Date 1484120759 28800 # Node ID 73e36dac5be7ce8787f31dbce7a6ff6f78f5842a # Parent 9fc680b35dbbd775fc2f02de5acb95d0e0554239 Fix GDB remote protocol support diff -r 9fc680b35dbb -r 73e36dac5be7 gdb_remote.c --- a/gdb_remote.c Tue Jan 10 09:29:28 2017 -0800 +++ b/gdb_remote.c Tue Jan 10 23:45:59 2017 -0800 @@ -378,7 +378,7 @@ if (!memcmp("Supported", command+1, strlen("Supported"))) { sprintf(send_buf, "PacketSize=%X", (int)bufsize); gdb_send_command(send_buf); - } else if (!memcmp("Attached", command+1, strlen("Supported"))) { + } else if (!memcmp("Attached", command+1, strlen("Attached"))) { //not really meaningful for us, but saying we spawned a new process //is probably closest to the truth gdb_send_command("0"); @@ -395,7 +395,12 @@ gdb_send_command(""); } else if (command[1] == 'C') { //we only support a single thread currently, so send 1 - gdb_send_command("1"); + gdb_send_command("QC1"); + } else if (!strcmp("fThreadInfo", command + 1)) { + //we only support a single thread currently, so send 1 + gdb_send_command("m1"); + } else if (!strcmp("sThreadInfo", command + 1)) { + gdb_send_command("l"); } else { goto not_impl; } @@ -403,6 +408,8 @@ case 'v': if (!memcmp("Cont?", command+1, strlen("Cont?"))) { gdb_send_command("vCont;c;C;s;S"); + } else if (!strcmp("MustReplyEmpty", command + 1)) { + gdb_send_command(""); } else if (!memcmp("Cont;", command+1, strlen("Cont;"))) { switch (*(command + 1 + strlen("Cont;"))) {