<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.

llvm-svn: 178719
This commit is contained in:
Greg Clayton 2013-04-04 00:15:09 +00:00
parent d6e6ddd636
commit 9ff5aae5b0
1 changed files with 3 additions and 1 deletions

View File

@ -178,7 +178,9 @@ TargetList::CreateTarget (Debugger &debugger,
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;
}
}
}