https://github.com/chelcassanova created https://github.com/llvm/llvm-project/pull/91404
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). >From 4458e951ed4b8d226974000dae2705ad6ec6ed79 Mon Sep 17 00:00:00 2001 From: Chelsea Cassanova <chelsea_cassan...@apple.com> Date: Tue, 7 May 2024 14:20:14 -0700 Subject: [PATCH] [lldb][breakpointoptions] Make disabled keyword red 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). --- lldb/include/lldb/Breakpoint/BreakpointOptions.h | 6 ++++++ lldb/source/Breakpoint/BreakpointOptions.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h index 7bf545717422..3dc3a7190d03 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 6c6037dd9edd..993de590b0d4 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 "); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits