[Lldb-commits] [lldb] 3ccfbc8 - [lldb] Make sure changing the separator takes immediate effect (#136779)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 22 22:38:32 PDT 2025
Author: Jonas Devlieghere
Date: 2025-04-22T22:38:28-07:00
New Revision: 3ccfbc8a002e1e0f64b5408d26bc42282afc194b
URL: https://github.com/llvm/llvm-project/commit/3ccfbc8a002e1e0f64b5408d26bc42282afc194b
DIFF: https://github.com/llvm/llvm-project/commit/3ccfbc8a002e1e0f64b5408d26bc42282afc194b.diff
LOG: [lldb] Make sure changing the separator takes immediate effect (#136779)
The setter is only used when changing the setting programmatically. When
using the settings command, we need to monitor SetPropertyValue.
Added:
Modified:
lldb/source/Core/Debugger.cpp
lldb/test/API/functionalities/statusline/TestStatusline.py
Removed:
################################################################################
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index b572210f25603..cd8726eeba632 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -257,7 +257,9 @@ Status Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
else
m_statusline.reset();
} else if (property_path ==
- g_debugger_properties[ePropertyStatuslineFormat].name) {
+ g_debugger_properties[ePropertyStatuslineFormat].name ||
+ property_path ==
+ g_debugger_properties[ePropertySeparator].name) {
// Statusline format changed. Redraw the statusline.
RedrawStatusline();
} else if (property_path ==
diff --git a/lldb/test/API/functionalities/statusline/TestStatusline.py b/lldb/test/API/functionalities/statusline/TestStatusline.py
index dcededdb11e39..da6b4e7c8f320 100644
--- a/lldb/test/API/functionalities/statusline/TestStatusline.py
+++ b/lldb/test/API/functionalities/statusline/TestStatusline.py
@@ -46,8 +46,10 @@ def test(self):
self.child.expect(re.escape("a.out | main.c:2:11 | bre"))
self.child.setwinsize(terminal_height, terminal_width)
+ # Change the separator.
+ self.expect('set set separator "S "', ["a.out S main.c:2:11"])
+
# Change the format.
- self.expect('set set separator "S"')
self.expect(
'set set statusline-format "target = {${target.file.basename}} ${separator}"',
["target = a.out S"],
More information about the lldb-commits
mailing list