Skip to content

Commit a579d0b

Browse files
JDevlieghereadrian-prantl
authored andcommitted
[lldb] Make sure changing the separator takes immediate effect (llvm#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)
1 parent 785b196 commit a579d0b

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
@@ -253,7 +253,9 @@ Status Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
253253
else
254254
m_statusline.reset();
255255
} else if (property_path ==
256-
g_debugger_properties[ePropertyStatuslineFormat].name) {
256+
g_debugger_properties[ePropertyStatuslineFormat].name ||
257+
property_path ==
258+
g_debugger_properties[ePropertySeparator].name) {
257259
// Statusline format changed. Redraw the statusline.
258260
RedrawStatusline();
259261
} 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)