[Lldb-commits] [lldb] [lldb][breakpoint] Grey out disabled breakpoints (PR #91404)

Chelsea Cassanova via lldb-commits lldb-commits at lists.llvm.org
Thu May 9 12:41:29 PDT 2024


================
@@ -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());
----------------
chelcassanova wrote:

![image](https://github.com/llvm/llvm-project/assets/21184907/0a95ccc6-bf9a-4acb-b8e0-2746d5911f15)
I also thought that I'd have to reset the colours back to normal somewhere but when I tried this for a little the colours seemed fine without explicitly placing a reset somewhere.

I can still add a reset alongside this simplified logic though.

https://github.com/llvm/llvm-project/pull/91404


More information about the lldb-commits mailing list