[lldb] [llvm] [lldb][windows] use Windows APIs to print to the console (PR #149493)

Charles Zablit via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 24 05:46:15 PDT 2025


charles-zablit wrote:

> > I can't find where a `Stream` actually gets "printed" to the stdout.
> 
> A `NativeFile` stream is used, which is created [here](https://github.com/llvm/llvm-project/blob/a676ecd83fad9b04d315c4e667742d25679cbc9f/lldb/source/Core/Debugger.cpp#L967-L970).
> 
> > [2b8c692](https://github.com/llvm/llvm-project/commit/2b8c69204b1d37d91cc775d51af50df7f478cecd) does not look like such big of a change, is `lldb`'s mechanism for printing so different from `clang`'s?
> 
> I agree, that would probably be of a similar size here (i.e. check for the file handle and call the windows impl if needed).

Thanks for the information! I was able to use the Windows API and the existing code from `llvm` to add proper unicode support. I think this is the better solution out of the 2 options.

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


More information about the llvm-commits mailing list