Mercurial > repos > blastem
changeset 1166:73e36dac5be7
Fix GDB remote protocol support
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 10 Jan 2017 23:45:59 -0800 |
parents | 9fc680b35dbb |
children | e758ddbf0624 |
files | gdb_remote.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;"))) {