[Lldb-commits] [lldb] r179904 - Change my patch to TargetList::CreateTarget to only try

Jason Molenda jmolenda at apple.com
Fri Apr 19 15:38:51 PDT 2013


Author: jmolenda
Date: Fri Apr 19 17:38:50 2013
New Revision: 179904

URL: http://llvm.org/viewvc/llvm-project?rev=179904&view=rev
Log:
Change my patch to TargetList::CreateTarget to only try
realpathing the executable binary if we fail to find a
binary and if it starts with a ~ character, based on feedback
from Greg Clayton.

Modified:
    lldb/trunk/source/Target/TargetList.cpp

Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=179904&r1=179903&r2=179904&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Fri Apr 19 17:38:50 2013
@@ -157,7 +157,11 @@ TargetList::CreateTarget (Debugger &debu
     if (!arch.IsValid())
         arch = specified_arch;
 
-    FileSpec file (user_exe_path, true);
+    FileSpec file (user_exe_path, false);
+    if (!file.Exists() && user_exe_path && user_exe_path[0] == '~')
+    {
+        file = FileSpec(user_exe_path, true);
+    }
     bool user_exe_path_is_bundle = false;
     char resolved_bundle_exe_path[PATH_MAX];
     resolved_bundle_exe_path[0] = '\0';





More information about the lldb-commits mailing list