[Lldb-commits] [PATCH] Enhance the Pipe interface for better portability
zturner at google.com
Tue Dec 16 11:40:44 PST 2014
Hi clayborg, ovyalov,
This patch makes a number of improvements to the Pipe interface.
1) 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.
2) 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.
3) A new ReadWithTimeout() method is exposed in the base class and implemented on Windows.
4) 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 21258 bytes
Desc: not available
More information about the lldb-commits