chelcassanova wrote:
I changed this PR to make disabled breakpoints greyed out (per Ismail's
suggestion). Since this is being done at the `Breakpoint` level we have access
to the target and its debugger to access `GetUseColor()`.
https://github.com/llvm/llvm-project/pull/91404
https://github.com/chelcassanova updated
https://github.com/llvm/llvm-project/pull/91404
>From c334f7357aebefa3e0b7af645396e699cf3a4c8d Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova
Date: Thu, 9 May 2024 11:08:29 -0700
Subject: [PATCH] [lldb][breakpoint] Grey out disabled breakpoints
This
@@ -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 ",
+
medismailben wrote:
More of a styling preference, but I wouldn't use red as the color for disabled
breakpoint, I think it would be more suited for unresolved ones (that could be
done in a follow-up). Instead, I'd use the `ANSI_CTRL_FAINT` escape code to
match what you can find in many IDEs.
@@ -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 ",
+
@@ -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 ",
+
@@ -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 ",
+
@@ -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 ",
+
@@ -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 ",
+
@@ -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 ",
+
@@ -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
@@ -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
https://github.com/bulbazord requested changes to this pull request.
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
https://github.com/bulbazord edited
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
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Chelsea Cassanova (chelcassanova)
Changes
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/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
16 matches
Mail list logo