[Lldb-commits] [PATCH] D83425: [lldb] add printing of stdout compile errors to lldbsuite
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 15 06:29:39 PDT 2020
labath added a comment.
In D83425#2151003 <https://reviews.llvm.org/D83425#2151003>, @bbli wrote:
> Yeah so in this pic, F12338615: original.png <https://reviews.llvm.org/F12338615>, you can see in the code that both stdout and stderr point to PIPE, and what gets printed out is the concatenation of the two. However, in F12338626: stderr_as_stdout.png <https://reviews.llvm.org/F12338626>, where stderr now points to stdout, and I just print the stdout output, the "clang-11: error" messages from stderr gets mixed up with the results from stdout,
Yes, that's exactly what I wanted! :) It matches the output I would get when running that command in the terminal and it makes the error come out right after the compiler command which produced it (it more complex makefiles it may not be so clear which compiler command produced what error).
The fact that the first "random flag" error seemingly comes out before any compiler command is weird but not related to this problem. That happens because our makefile runs a silent (without echoing the command) compiler invocation to build the dependency file. We may possibly want to echo that too, but it doesn't matter that much -- in more realistic scenarios, the error will not be as simple as a missing flag, and the dependency command will succeed, but the error will come from the compilation step.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83425/new/
https://reviews.llvm.org/D83425
More information about the lldb-commits
mailing list