PushFile - fixed DONE response handling.
PullFile - fixed RECV response handling.
Added STAT request.
Details
- Reviewers
labath
Diff Detail
Event Timeline
source/Plugins/Platform/Android/AdbClient.cpp | ||
---|---|---|
272 | This will fail if the file exists but is of zero size. In any case, I don't think the solution is to do a stat() before we attempt the transfer, since there are lots of ways the transfer can go south even if the stat call succeeds (file has wrong permissions, file has been removed in the mean time, uncorrectable read error, connection got terminated, ...). Adb already sends us the exact error that occurred in response to the RECV command, but we fail to parse it out for some reason. For example, if I remove the read permission on the file, adb sends the 'Permission denied' error, but for some reason we end up displaying: get-file failed: Failed to read file chunk: Got unexpected response id from adb: "issi" The "issi" string is actually the substring of the "Permission denied", so it looks there there is some error in the protocol parsing. Isn't it possible to do something similar as in the PushFile implementation? |
source/Plugins/Platform/Android/AdbClient.cpp | ||
---|---|---|
272 | I traced STAT command used by adb pull by missed that RECV command may have FAIL response with error message - fixed that. |
AFFECTED FILES
/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp /lldb/trunk/source/Plugins/Platform/Android/AdbClient.h
USERS
ovyalov (Author)
This will fail if the file exists but is of zero size. In any case, I don't think the solution is to do a stat() before we attempt the transfer, since there are lots of ways the transfer can go south even if the stat call succeeds (file has wrong permissions, file has been removed in the mean time, uncorrectable read error, connection got terminated, ...). Adb already sends us the exact error that occurred in response to the RECV command, but we fail to parse it out for some reason. For example, if I remove the read permission on the file, adb sends the 'Permission denied' error, but for some reason we end up displaying:
The "issi" string is actually the substring of the "Permission denied", so it looks there there is some error in the protocol parsing. Isn't it possible to do something similar as in the PushFile implementation?