[Lldb-commits] [PATCH] Use timeout when reading debugserver's port from a named pipe.

Oleksiy Vyalov ovyalov at google.com
Tue Dec 2 15:45:16 PST 2014


Hi clayborg,

After debugserver is launched (either by lldb or lldb-platform) it may terminate prematurely even after successful start by various reasons:
1. Invalid flag configuration.
2. Socket errors.
...

In this case a named pipe (used to deliver a port that debugserver listens) will be never opened and written - so, lldb or platform hangs forever.
This CL fixes the problem by opening pipe in non-blocking mode and waiting on pipe data via select.

Potentially, this issue might be handled even more properly if GDBRemoteCommunication::StartDebugserverProcess gets notified about debugserver termination (via callback or condition variable). If such approach sounds reasonable I can do it as a next step.

http://reviews.llvm.org/D6490

Files:
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6490.16835.patch
Type: text/x-patch
Size: 3386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141202/2bae6722/attachment.bin>


More information about the lldb-commits mailing list