[Lldb-commits] [PATCH] D54072: Add a command to dump a module's clang ast.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Sun Nov 4 06:17:54 PST 2018

The issue is that clang writes directly to stderr
On Sun, Nov 4, 2018 at 5:38 AM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath added a comment.
> In https://reviews.llvm.org/D54072#1286748, @zturner wrote:
> > Unfortunately then color output is impossible. Where else would the
> output
> >  be expected to go?
> If you execute the command over the SB API
> (SBCommandInterpreter::HandleCommand) then it will go into the provided
> result object. Also, some clients (typically IDEs) use
> SetInput/Output/ErrorFileHandle to set what is considered to be the default
> input/output streams for a given debugger instance (typically, to redirect
> these to some console window).
> I don't think this directly precludes colored output, although it may
> require a bit more plumbing to pass the information whether the final
> consumer is willing to accept color escape codes. (We can already get that
> via `StreamFile->GetFile().GetIsTerminalWithColors()`, so you would just
> need to somehow pass this information to the proxy raw_ostream you give to
> the clang dump function.)
> https://reviews.llvm.org/D54072
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181104/8f1be688/attachment-0001.html>

More information about the lldb-commits mailing list