[Lldb-commits] [lldb] [lldb][breakpointoptions] Make disabled keyword red (PR #91404)
via lldb-commits
lldb-commits at lists.llvm.org
Tue May 7 15:33:49 PDT 2024
================
@@ -534,7 +534,8 @@ void BreakpointOptions::GetDescription(Stream *s,
if (m_ignore_count > 0)
s->Printf("ignore: %d ", m_ignore_count);
- s->Printf("%sabled ", m_enabled ? "en" : "dis");
+ s->PutCStringColorHighlighted(m_enabled ? "enabled " : "disabled ",
+ m_disbaled_breakpoint_highlight_settings);
----------------
jimingham wrote:
It seems odd you can't ask the stream whether it is using colors or not. Because if I'm running with use-colors on, but I want to use the description of a breakpoint w/o colors - say to put it in a log - then I would correctly make an SBStream which is supposed to not use colors, and pass that to the description. If you ONLY check whether the debugger is using colors, and override the stream's setting, then you will do the wrong thing.
https://github.com/llvm/llvm-project/pull/91404
More information about the lldb-commits
mailing list