Using the adb push protocol is significantly faster than the current method of sending the hex encoded file data for the remote to write to the file.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Please see my comments.
source/Plugins/Platform/Android/AdbClient.cpp | ||
---|---|---|
44 | Please check how it works on Windows - https://github.com/llvm-mirror/lldb/blob/master/include/lldb/Host/windows/win32.h resets S_IRWXU and S_IRWXG to 0, we may want to define just numeric constants here instead. | |
306 | stringstream::str returns copy of string - could you store file_description.str() as temp variable in order to reuse for length() and c_str() ? | |
311 | Do we need to fail if src.read(chunk, kMaxPushData).bad() returns true? | |
317 | You may use FileSpec::GetModificationTime here to get source lmt. |
- Get modification time for adb push from source file (Pass FileSpec directly through)
- Hard-code file mode flags (to not rely on platform definitions)
- Return failure if a failure occurs reading the source file.
source/Plugins/Platform/Android/AdbClient.cpp | ||
---|---|---|
44 | Lets just define the numeric constant, done. | |
306 | Done. | |
311 | Done. | |
317 | Done. |
Looks good.
source/Plugins/Platform/Android/AdbClient.h | ||
---|---|---|
54 | For the consistency of interface will need to make PutFile to take FileSpecs as parameters - no need to do this now, I can clean it up later. |
For the consistency of interface will need to make PutFile to take FileSpecs as parameters - no need to do this now, I can clean it up later.