Skip to content

Conversation

@JDevlieghere
Copy link
Member

The setter is only used when changing the setting programmatically. When using the settings command, we need to monitor SetPropertyValue.

The setter is only used when changing the setting programmatically. When
using the settings command, we need to monitor SetPropertyValue.
@llvmbot
Copy link
Member

llvmbot commented Apr 22, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

The setter is only used when changing the setting programmatically. When using the settings command, we need to monitor SetPropertyValue.


Full diff: https://github.com/llvm/llvm-project/pull/136779.diff

2 Files Affected:

  • (modified) lldb/source/Core/Debugger.cpp (+3-1)
  • (modified) lldb/test/API/functionalities/statusline/TestStatusline.py (+3-1)
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"],

@JDevlieghere JDevlieghere merged commit 3ccfbc8 into llvm:main Apr 23, 2025
12 checks passed
@JDevlieghere JDevlieghere deleted the separator-set branch April 23, 2025 05:38
adrian-prantl pushed a commit to adrian-prantl/llvm-project that referenced this pull request Apr 23, 2025
…136779)

The setter is only used when changing the setting programmatically. When
using the settings command, we need to monitor SetPropertyValue.

(cherry picked from commit 3ccfbc8)
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
…136779)

The setter is only used when changing the setting programmatically. When
using the settings command, we need to monitor SetPropertyValue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants