[Lldb-commits] [lldb] r236516 - Fix process launch from Windows host to Android target.

Chaoren Lin chaorenl at google.com
Tue May 5 11:43:19 PDT 2015


Author: chaoren
Date: Tue May  5 13:43:19 2015
New Revision: 236516

URL: http://llvm.org/viewvc/llvm-project?rev=236516&view=rev
Log:
Fix process launch from Windows host to Android target.

Summary:
- Denormalized path on Windows host causes bad `A` packet.
- Executables copied from Windows host doesn't have executable bits.

Reviewers: tberghammer, zturner, ovyalov

Reviewed By: ovyalov

Subscribers: tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D9492

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=236516&r1=236515&r2=236516&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Tue May  5 13:43:19 2015
@@ -1312,7 +1312,7 @@ GDBRemoteCommunicationClient::SendArgume
     const char *arg = NULL;
     const Args &launch_args = launch_info.GetArguments();
     if (exe_file)
-        exe_path = exe_file.GetPath();
+        exe_path = exe_file.GetPath(false);
     else
     {
         arg = launch_args.GetArgumentAtIndex(0);
@@ -3221,7 +3221,7 @@ GDBRemoteCommunicationClient::SetFilePer
     if (response.GetChar() != 'F')
         return Error("invalid response to '%s' packet", packet);
 
-    return Error(response.GetU32(false, UINT32_MAX), eErrorTypePOSIX);
+    return Error(response.GetU32(UINT32_MAX), eErrorTypePOSIX);
 }
 
 static uint64_t

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=236516&r1=236515&r2=236516&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Tue May  5 13:43:19 2015
@@ -2378,6 +2378,7 @@ Target::Install (ProcessLaunchInfo *laun
                                     module_sp->SetPlatformFileSpec(remote_file);
                                     if (is_main_executable)
                                     {
+                                        platform_sp->SetFilePermissions(remote_file.GetPath(false).c_str(), 0700);
                                         if (launch_info)
                                             launch_info->SetExecutableFile(remote_file, false);
                                     }





More information about the lldb-commits mailing list