[Lldb-commits] [PATCH] D19533: Introduce Connection::ReadAll and fix AdbClient

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 26 06:05:53 PDT 2016


labath created this revision.
labath added reviewers: clayborg, zturner.
labath added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer.

AdbClient was attempting to handle the case where the socket input arrived in pieces, but it was
failing to handle the case where the connection was closed before that happened. In this case, it
would just spin in an infinite loop calling Connection::Read. (This was also the cause of the
spurious timeouts on the darwin->android buildbot. The exact cause of the premature EOF remains
to be investigated, but is likely a server bug.)

Since this wait-for-a-certain-number-of-bytes seems like a useful functionality to have, I am
moving it (with the infinite loop fixed) to the Connection class, and adding an
appropriate test for it.

http://reviews.llvm.org/D19533

Files:
  include/lldb/Core/Connection.h
  source/Core/Connection.cpp
  source/Plugins/Platform/Android/AdbClient.cpp
  unittests/Core/CMakeLists.txt
  unittests/Core/ConnectionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19533.54997.patch
Type: text/x-patch
Size: 9711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160426/2bf0733e/attachment-0001.bin>


More information about the lldb-commits mailing list