Michael137 wrote:

> > > What happens if you have colors disabled in your terminal? Does this do 
> > > nothing? Or does it start inserting ANSI escape codes in plain text?
> > 
> > 
> > Yea good question, was about to try this out. It does whatever clang's 
> > `ast-dump` would do if colors aren't turned off
> 
> That keys off of the output stream supporting colors, but LLDB also allows 
> you to disable colors globally. Please also try `lldb --no-use-colors` and 
> see if that behaves correctly (it might if we set the properties of the 
> stream correctly). If it doesn't you'll need to read `debugger.GetUseColor()`.

It behaves correctly for the `target modules dump ast` case because that uses 
the LLDB streams, as you mentioned. For other diagnostics we would have to use 
the `GetUseColor` API, though we'd have to plumb the target through to 
`TypeSystemClang::CreateASTContext` first, to get access to the debugger 
object. Will try that instead

https://github.com/llvm/llvm-project/pull/86159
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to