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

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 4 01:00:27 PST 2024


================
@@ -77,6 +78,15 @@ void SBStream::Printf(const char *format, ...) {
   va_end(args);
 }
 
+bool SBStream::HasColor() {
+  return m_opaque_up->AsRawOstream().colors_enabled();
+}
+
+void SBStream::FormatAnsiTerminalCodes(llvm::StringRef format) {
+  if (HasColor())
+    Printf("%s", ansi::FormatAnsiTerminalCodes(format).c_str());
----------------
labath wrote:

```suggestion
    m_opaque_up->PutCString(ansi::FormatAnsiTerminalCodes(format));
```

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


More information about the lldb-commits mailing list