Skip to content

Commit 95dc729

Browse files
committed
rsp-server: Handle vMustReplyEmpty packets
GDB sends vMustReplyEmpty as a feature test to detect old/broken GDB server behavior[1]. The correct reply is an empty response, which is what we already send, but we warn about it. Since we should expect to receive this packet, silence the warning, and add a comment to ensure we maintain the expected behavior. [1]: https://sourceware.org/gdb/onlinedocs/gdb/Packets.html Signed-off-by: Samuel Holland <[email protected]>
1 parent 3c5fdd6 commit 95dc729

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

debug/rsp-server.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,8 +2150,12 @@ rsp_vpkt (struct rsp_buf *buf)
21502150
}
21512151
else
21522152
{
2153-
fprintf (stderr, "Warning: Unknown RSP 'v' packet type %s: ignored\n",
2154-
buf->data);
2153+
/* GDB expects an empty response for unknown 'v' packets. */
2154+
if (0 != strcmp ("vMustReplyEmpty", buf->data))
2155+
{
2156+
fprintf (stderr, "Warning: Unknown RSP 'v' packet type %s: ignored\n",
2157+
buf->data);
2158+
}
21552159
put_str_packet ("");
21562160
return;
21572161
}

0 commit comments

Comments
 (0)