This patch makes a number of improvements to the Pipe interface.
- An interface (PipeBase) is provided which exposes pure virtual methods for any implementation of Pipe to override. While not strictly necessary, this helps catch errors where the interfaces are out of sync. In fact, this would have caught a subtle bug on Windows where the signature of the Open() method had a compatible but different signature to the Posix version due to the use of default arguments. This guarantees that the interfaces remain in sync.
- All methods return lldb_private::Error instead of bools, or in some cases nothing. This allows richer error information to be propagated up to LLDB.
- A new ReadWithTimeout() method is exposed in the base class and implemented on Windows.
- Support for both named and anonymous pipes is exposed through the base interface and implemented on Windows. For creating a new pipe, both named and anonymous pipes are supported, and for opening an existing pipe, only named pipes are supported.
The new interface will need to be implemented in PipePosix before this can go live. I was hoping Oleksiy could do that at the same time he puts the logic back for reading the port from debugserver's pipe with timeout. This new interface should provide sufficient flexibility that this will be portable on all platforms.