[Lldb-commits] [lldb] [lldb][gdb-remote] Send QSetSTDIOWindowSize for a 0x0 size (PR #205772)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 25 03:47:19 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/205772

The client uses a 0x0 STDIO window size as a deliberate signal to the server that there is no client terminal, so the server should redirect the inferior's stdio over anonymous pipes instead of a ConPTY (on Windows).

This is a follow up to https://github.com/llvm/llvm-project/pull/203562.

rdar://178725958

>From 8b99fd2f1126b81ded504b43f08e2774db37aad6 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 25 Jun 2026 11:45:24 +0100
Subject: [PATCH] [lldb][gdb-remote] Send QSetSTDIOWindowSize for a 0x0 size

---
 .../Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index b5e0b8887f039..06a82eee621d3 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -2039,7 +2039,7 @@ int GDBRemoteCommunicationClient::SetSTDERR(const FileSpec &file_spec) {
 
 int GDBRemoteCommunicationClient::SetSTDIOWindowSize(uint16_t cols,
                                                      uint16_t rows) {
-  if (cols == 0 || rows == 0)
+  if ((cols == 0) != (rows == 0))
     return -1;
   StreamString packet;
   packet.Printf("QSetSTDIOWindowSize:cols=%u;rows=%u",



More information about the lldb-commits mailing list