================
@@ -848,6 +850,13 @@ void Breakpoint::GetDescription(Stream *s,
lldb::DescriptionLevel level,
const size_t num_locations = GetNumLocations();
const size_t num_resolved_locations = GetNumResolvedLocations();
+ // Grey out any disabled breakpoints in the list of breakpoints.
+ if (GetTarget().GetDebugger().GetUseColor())
+ s->Printf("%s",
+ IsEnabled()
+ ? ansi::FormatAnsiTerminalCodes("${ansi.normal}").c_str()
+ : ansi::FormatAnsiTerminalCodes("${ansi.faint}").c_str());
----------------
JDevlieghere wrote:
You need to reset the color after printing, otherwise everything in the
terminal printed after will be faint. Also seems like you can simplify this by
moving the check for `IsEnabled()` into the first `if`:
```
const bool print_faint = !IsEnabled() &&
GetTarget().GetDebugger().GetUseColor();
if (print_faint)
s->Print(ansi::FormatAnsiTerminalCodes("${ansi.faint}"));
[...]
if (print_faint)
s->Print(ansi::FormatAnsiTerminalCodes("${ansi.reset}"));
```
https://github.com/llvm/llvm-project/pull/91404
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits