Retry remote connection one time in case of timeout and return an error that specifies why debugging failed.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217998 91177308-0d34-0410-b5e6-96231b3b80d8
Listen to the return value of the Platform::WriteFile() call within PlatformPOSIX::PutFile() in case we write less than we wanted to. Also adjust the input stream's offset in such cases.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217999 91177308-0d34-0410-b5e6-96231b3b80d8
Add better logging for the "$vFile:pwrite:" packet so we can show binary data instead of nothing or unprintable characters. This can easily be extended for other packets that have binary data.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218000 91177308-0d34-0410-b5e6-96231b3b80d8
Hex encode the triple values in case they contain special characters.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218001 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the ability of "lldb-platform" to upload files.

The issue was GDBRemoteCommunication::CheckForPacket() already fixes up any prefixed bytes (0x7d followed by value that is XOR'ed with 0x20). If we do this again, we cause binary packets to lose bytes.

This allows lldb-platform to be able to upload binaries and debug them remotely.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218002 91177308-0d34-0410-b5e6-96231b3b80d8