llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Chelsea Cassanova (chelcassanova) <details> <summary>Changes</summary> This commit adds colour highlighting to the `disabled` keyword in the breakpoint list so that it appears red (and should be easier to see in a large sea of breakpoints). --- Full diff: https://github.com/llvm/llvm-project/pull/91404.diff 2 Files Affected: - (modified) lldb/include/lldb/Breakpoint/BreakpointOptions.h (+6) - (modified) lldb/source/Breakpoint/BreakpointOptions.cpp (+2-1) ``````````diff diff --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h index 7bf545717422f..3dc3a7190d03e 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointOptions.h +++ b/lldb/include/lldb/Breakpoint/BreakpointOptions.h @@ -400,6 +400,12 @@ friend class Breakpoint; /// Which options are set at this level. /// Drawn from BreakpointOptions::SetOptionsFlags. Flags m_set_flags; + /// Settings that allow the 'disabled' keyword to be displayed in red. + Stream::HighlightSettings m_disbaled_breakpoint_highlight_settings{ + "disabled", + "\x1b[31m", + "\x1b[37m", + }; }; } // namespace lldb_private diff --git a/lldb/source/Breakpoint/BreakpointOptions.cpp b/lldb/source/Breakpoint/BreakpointOptions.cpp index 6c6037dd9edd3..993de590b0d4f 100644 --- a/lldb/source/Breakpoint/BreakpointOptions.cpp +++ b/lldb/source/Breakpoint/BreakpointOptions.cpp @@ -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); if (m_one_shot) s->Printf("one-shot "); `````````` </details> https://github.com/llvm/llvm-project/pull/91404 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits