[Lldb-commits] [lldb] r178719 - <rdar://problem/12897145>

Greg Clayton gclayton at apple.com
Wed Apr 3 17:15:09 PDT 2013


Author: gclayton
Date: Wed Apr  3 19:15:09 2013
New Revision: 178719

URL: http://llvm.org/viewvc/llvm-project?rev=178719&view=rev
Log:
<rdar://problem/12897145>

Changes to lldb made the following fail when it used to work:

% cd /tmp
% lldb ls
error: unable to find executable for '/tmp/ls'

Resolving an executable with no relative path was broken, now its fixed.


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=178719&r1=178718&r2=178719&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Wed Apr  3 19:15:09 2013
@@ -178,7 +178,9 @@ TargetList::CreateTarget (Debugger &debu
                     std::string cwd_user_exe_path (cwd);
                     cwd_user_exe_path += '/';
                     cwd_user_exe_path += user_exe_path;
-                    file.SetFile(cwd_user_exe_path.c_str(), false);
+                    FileSpec cwd_file (cwd_user_exe_path.c_str(), false);
+                    if (cwd_file.Exists())
+                        file = cwd_file;
                 }
             }
         }





More information about the lldb-commits mailing list