diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-04-19 22:38:50 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-04-19 22:38:50 +0000 |
commit | d26206b54735c4671ef87ca7a413d4d28c9f1cb7 (patch) | |
tree | da1f178fdca88d2f05889152f73c1e759747ef64 /lldb/source/Target/TargetList.cpp | |
parent | 24e8a0d5f073e0628b980d8cc47bdc8f84457dc6 (diff) | |
download | bcm5719-llvm-d26206b54735c4671ef87ca7a413d4d28c9f1cb7.tar.gz bcm5719-llvm-d26206b54735c4671ef87ca7a413d4d28c9f1cb7.zip |
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.
llvm-svn: 179904
Diffstat (limited to 'lldb/source/Target/TargetList.cpp')
-rw-r--r-- | lldb/source/Target/TargetList.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp index 93a0b82aed6..3b13a0885de 100644 --- a/lldb/source/Target/TargetList.cpp +++ b/lldb/source/Target/TargetList.cpp @@ -157,7 +157,11 @@ TargetList::CreateTarget (Debugger &debugger, 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'; |