Skip to content

Commit 3ccfbc8

Browse files
authored
[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.
1 parent 439f16a commit 3ccfbc8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lldb/source/Core/Debugger.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ Status Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
257257
else
258258
m_statusline.reset();
259259
} else if (property_path ==
260-
g_debugger_properties[ePropertyStatuslineFormat].name) {
260+
g_debugger_properties[ePropertyStatuslineFormat].name ||
261+
property_path ==
262+
g_debugger_properties[ePropertySeparator].name) {
261263
// Statusline format changed. Redraw the statusline.
262264
RedrawStatusline();
263265
} else if (property_path ==

lldb/test/API/functionalities/statusline/TestStatusline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ def test(self):
4646
self.child.expect(re.escape("a.out | main.c:2:11 | bre"))
4747
self.child.setwinsize(terminal_height, terminal_width)
4848

49+
# Change the separator.
50+
self.expect('set set separator "S "', ["a.out S main.c:2:11"])
51+
4952
# Change the format.
50-
self.expect('set set separator "S"')
5153
self.expect(
5254
'set set statusline-format "target = {${target.file.basename}} ${separator}"',
5355
["target = a.out S"],

0 commit comments

Comments
 (0)