Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-08 Thread Oleksiy Vyalov via lldb-commits
ovyalov closed this revision. ovyalov added a comment. Files: /lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp /lldb/trunk/source/Plugins/Platform/Android/AdbClient.h /lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Users: ovyalov (Author)

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-08 Thread Oleksiy Vyalov via lldb-commits
ovyalov updated this revision to Diff 63255. ovyalov added a comment. Reran with proper clang-format. http://reviews.llvm.org/D22081 Files: source/Plugins/Platform/Android/AdbClient.cpp source/Plugins/Platform/Android/AdbClient.h source/Plugins/Platform/Android/PlatformAndroid.cpp

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-08 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment. In http://reviews.llvm.org/D22081#477746, @labath wrote: > Thanks for adding the additional checks. Looks good apart from the > clang-format changes. This looks like the llvm style. I am not sure how > you've run this but it does not seem to have picked up LLDB's

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-08 Thread Pavel Labath via lldb-commits
labath added a comment. Thanks for adding the additional checks. Looks good apart from the clang-format changes. This looks like the llvm style. I am not sure how you've run this but it does not seem to have picked up LLDB's `.clang-format` file. Are you using git? You need to set

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-07 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment. In http://reviews.llvm.org/D22081#476766, @labath wrote: > You raised good points here, Luke. > > I've thought about the quoting issue, but as you have already noticed there > is no way to pass arguments containing quotes to adb correctly. Thinking > about it more,

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-07 Thread Oleksiy Vyalov via lldb-commits
ovyalov updated this revision to Diff 63173. ovyalov added a comment. Addressed review comments: - Check whether shell command output starts with /system/bin/sh: in order to find out whether command failed - Fail-fast download if filename contains single-quotes - clang-format

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-07 Thread Pavel Labath via lldb-commits
labath added a comment. You raised good points here, Luke. I've thought about the quoting issue, but as you have already noticed there is no way to pass arguments containing quotes to adb correctly. Thinking about it more, what we could do is detect this situation (look for `'` in the file

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-07 Thread Luke Drummond via lldb-commits
ldrumm added a subscriber: ldrumm. Comment at: source/Plugins/Platform/Android/PlatformAndroid.cpp:244 @@ +243,3 @@ +char cmd[PATH_MAX]; +snprintf (cmd, sizeof (cmd), "cat '%s'", source_spec.GetCString (false)); + I have some issues with this

Re: [Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-07 Thread Pavel Labath via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Looks good. Please also run clang-format over the patch (also when I don't request it, i tend to forget about that). Comment at:

[Lldb-commits] [PATCH] D22081: Use shell cat command as a workaround if ADB stat cannot lookup a file

2016-07-06 Thread Oleksiy Vyalov via lldb-commits
ovyalov created this revision. ovyalov added reviewers: tberghammer, labath. ovyalov added a subscriber: lldb-commits. Herald added subscribers: danalbert, tberghammer. adbd may fail to access a file due security constraints - in such case sync:stat command returns file's mode as 0. If it's the