Skip to content

Commit 09488bc

Browse files
[lldb] Disable statusline on Windows (#138111)
Something to do with control code handling in Windows terminals breaks the statusline in various ways. It makes LLDB unusable and even if you set the setting to disable statusline, it's too late, and the terminal session is now in a weird state. See #134846 for more details. Until we figure this out, don't allow it to be used on Windows.
1 parent c617466 commit 09488bc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

lldb/source/Core/CoreProperties.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ let Definition = "debugger" in {
177177
def ShowStatusline: Property<"show-statusline", "Boolean">,
178178
Global,
179179
DefaultTrue,
180-
Desc<"Whether to show a statusline at the bottom of the terminal.">;
180+
Desc<"Whether to show a statusline at the bottom of the terminal (not supported on Windows).">;
181181
def Separator : Property<"separator", "String">,
182182
Global,
183183
DefaultStringValue<"│ ">,

lldb/source/Core/Debugger.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -2031,13 +2031,17 @@ void Debugger::CancelForwardEvents(const ListenerSP &listener_sp) {
20312031
}
20322032

20332033
bool Debugger::StatuslineSupported() {
2034+
// We have trouble with the contol codes on Windows, see
2035+
// https://github.com/llvm/llvm-project/issues/134846.
2036+
#ifndef _WIN32
20342037
if (GetShowStatusline()) {
20352038
if (lldb::LockableStreamFileSP stream_sp = GetOutputStreamSP()) {
20362039
File &file = stream_sp->GetUnlockedFile();
20372040
return file.GetIsInteractive() && file.GetIsRealTerminal() &&
20382041
file.GetIsTerminalWithColors();
20392042
}
20402043
}
2044+
#endif
20412045
return false;
20422046
}
20432047

llvm/docs/ReleaseNotes.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ Changes to LLDB
249249
* A statusline was added to command-line LLDB to show progress events and
250250
information about the current state of the debugger at the bottom of the
251251
terminal. This is on by default and can be configured using the
252-
`show-statusline` and `statusline-format` settings.
252+
`show-statusline` and `statusline-format` settings. It is not currently
253+
supported on Windows.
253254
* The `min-gdbserver-port` and `max-gdbserver-port` options have been removed
254255
from `lldb-server`'s platform mode. Since the changes to `lldb-server`'s port
255256
handling in LLDB 20, these options have had no effect.

0 commit comments

Comments
 (0)