The change previously committed as 220983 broke large binary memory reads. I kept...
authorGreg Clayton <gclayton@apple.com>
Mon, 3 Nov 2014 21:02:54 +0000 (21:02 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 3 Nov 2014 21:02:54 +0000 (21:02 +0000)
commit118593a3af18af46be14cefbb5e5f2d20ea9471b
tree4add80a991159e21f22264e8201d40f86e5768e2
parentb8ceaf15cdf7eacc63630d024f0ceeae9d85c722
The change previously committed as 220983 broke large binary memory reads. I kept the "idx - 1" fix from 220983, but reverted the while loop that was incorrectly added.

The details are: large packets (like large memory reads (m packets) or large binary memory reads (x packet)) can get responses that come in across multiple read() calls. The while loop that was added meant that if only a partial packet came in (like only "$abc" coming for a response) GDBRemoteCommunication::CheckForPacket() was called, it would deadlock in the while loop because no more data is going to come in as this function needs to be called again with more data from another read. So the original fix will need to be corrected and resubmitted.

<rdar://problem/18853744>

llvm-svn: 221181
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp