summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/TargetList.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-09-10 04:48:55 +0000
committerCaroline Tice <ctice@apple.com>2010-09-10 04:48:55 +0000
commit428a9a58facb5aafed162386944f91afa17a1023 (patch)
tree64cc8b3e5f3b2585089bc2580e9f2d0ab59f0ded /lldb/source/Target/TargetList.cpp
parent6c0cc5e69a5bfdb5aefcbfce9629f9af2cee0979 (diff)
downloadbcm5719-llvm-428a9a58facb5aafed162386944f91afa17a1023.tar.gz
bcm5719-llvm-428a9a58facb5aafed162386944f91afa17a1023.zip
If the file the user specifies can't be found in the current directory,
and the user didn't specify a particular directory, search for the file using the $PATH environment variable. llvm-svn: 113575
Diffstat (limited to 'lldb/source/Target/TargetList.cpp')
-rw-r--r--lldb/source/Target/TargetList.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp
index d128d04040f..a4adf3f32fb 100644
--- a/lldb/source/Target/TargetList.cpp
+++ b/lldb/source/Target/TargetList.cpp
@@ -71,6 +71,10 @@ TargetList::CreateTarget
{
ModuleSP exe_module_sp;
FileSpec resolved_file(file);
+
+ if (!resolved_file.Exists())
+ resolved_file.ResolveExecutableLocation ();
+
if (!Host::ResolveExecutableInBundle (&resolved_file))
resolved_file = file;
OpenPOWER on IntegriCloud