[Lldb-commits] [PATCH] D59104: [lldb-vscode] Make server mode work on Windows
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 7 11:29:38 PST 2019
zturner created this revision.
zturner added a reviewer: clayborg.
Herald added a subscriber: mgorny.
For historical reasons, Windows unfortunately doesn't support using sockets in standard system calls like read/write, which means that they also can't be buffered with a `FILE*`. This violates some fundamental assumptions of how lldb-vscode was written, so fixing it requires some replumbing of the guts. I introduced an abstraction called `IOStream` which basically knows whether the descriptor is a socket or a non-socket, and then delegates to the appropriate underlying APIs accordingly. This means calling `read/write` on `stdin/stdout` and calling `recv/send` on sockets. Luckily this same strategy will also work on non-Windows platforms, so the abstractions needed aren't too egregious.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14894 bytes
Desc: not available
More information about the lldb-commits