From 1903f358bcc74fd96c65f0d1deba577c63238c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 29 Jun 2022 21:48:10 +0200 Subject: [lldb] [llgs] Send process output asynchronously in non-stop mode Introduce a new %Stdio notification category and use it to send process output asynchronously when running in non-stop mode. This is an LLDB extension since GDB does not use the 'O' packet for process output, just for replies to 'qRcmd' packets. Using the async notification mechanism implies that only the first output packet is sent immediately to the client. The client needs to request subsequent notifications (if any) using the new vStdio packet (that works pretty much like vStopped for the Stop notification queue). The packet handler in lldb-server tests is updated to handle the async stdio packets in addition to the regular O packets. However, due to the implications noted above, it can only handle the first output packet sent by the server. Subsequent packets need to be explicitly requested via vStdio. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D128849 --- lldb/source/Utility/StringExtractorGDBRemote.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp') diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index 0795440..fc74061 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -380,6 +380,8 @@ StringExtractorGDBRemote::GetServerPacketType() const { return eServerPacketType_vStopped; if (PACKET_MATCHES("vCtrlC")) return eServerPacketType_vCtrlC; + if (PACKET_MATCHES("vStdio")) + return eServerPacketType_vStdio; break; } -- cgit v1.1