[Lldb-commits] [lldb] [lldb] generalize the GDBRemoteCommunicationClient::GetVContSupported method (PR #182287)

Matej Košík via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 24 04:28:24 PST 2026


================
@@ -77,6 +77,42 @@ class GDBRemoteCommunicationClientTest : public GDBRemoteTest {
   MockServer server;
 };
 
+TEST_F(GDBRemoteCommunicationClientTest, vCont_c) {
+  std::future<bool> write_result = std::async(
+      std::launch::async, [&] { return client.GetVContSupported("c"); });
+  HandlePacket(server, "vCont?", "$vCont;c#16");
+  ASSERT_TRUE(write_result.get());
+  ASSERT_FALSE(client.GetVContSupported("C"));
+  ASSERT_FALSE(client.GetVContSupported("s"));
+  ASSERT_FALSE(client.GetVContSupported("S"));
+  ASSERT_TRUE(client.GetVContSupported("a"));
+  ASSERT_FALSE(client.GetVContSupported("A"));
+}
+
+TEST_F(GDBRemoteCommunicationClientTest, vCont_C) {
+  std::future<bool> write_result = std::async(
+      std::launch::async, [&] { return client.GetVContSupported("c"); });
+  HandlePacket(server, "vCont?", "$vCont;C#16");
+  ASSERT_FALSE(write_result.get());
+  ASSERT_TRUE(client.GetVContSupported("C"));
+  ASSERT_FALSE(client.GetVContSupported("s"));
+  ASSERT_FALSE(client.GetVContSupported("S"));
+  ASSERT_TRUE(client.GetVContSupported("a"));
+  ASSERT_FALSE(client.GetVContSupported("A"));
+}
+
+TEST_F(GDBRemoteCommunicationClientTest, vCont_cC) {
+  std::future<bool> write_result = std::async(
+      std::launch::async, [&] { return client.GetVContSupported("c"); });
+  HandlePacket(server, "vCont?", "$vCont;c;C#16");
+  ASSERT_TRUE(write_result.get());
+  ASSERT_TRUE(client.GetVContSupported("C"));
+  ASSERT_FALSE(client.GetVContSupported("s"));
+  ASSERT_FALSE(client.GetVContSupported("S"));
+  ASSERT_TRUE(client.GetVContSupported("a"));
+  ASSERT_FALSE(client.GetVContSupported("A"));
+}
+
----------------
sedymrak wrote:

Sure thing, that makes sense. I've pushed a corresponding commit.

https://github.com/llvm/llvm-project/pull/182287


More information about the lldb-commits mailing list