diff options
author | Sean Callanan <scallanan@apple.com> | 2015-11-05 19:46:12 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2015-11-05 19:46:12 +0000 |
commit | a95b131c9bda4400f88b0cf57fbe1d39afb7e4f7 (patch) | |
tree | 77b47a1d58ef74cf2bf8ae6d022cfa3031fb68bf | |
parent | 4bf262a0f207226c62b95ad774676157641b168a (diff) | |
download | bcm5719-llvm-a95b131c9bda4400f88b0cf57fbe1d39afb7e4f7.tar.gz bcm5719-llvm-a95b131c9bda4400f88b0cf57fbe1d39afb7e4f7.zip |
Better validation when we think a directory might be Xcode.app.
LLDB could otherwise get confused if it is (for example) in a
root that is meant to install into an Xcode.app but hasn't
been installed yet. That way Xcode can fall back to the real
Xcode.app rather than trying to look for resources inside the
root.
llvm-svn: 252198
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 8c1b820b05c..0c31ff7247e 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -1225,7 +1225,16 @@ CheckPathForXcode(const FileSpec &fspec) if (pos != std::string::npos) { path_to_shlib.erase(pos + strlen(substr)); - return FileSpec(path_to_shlib.c_str(), false); + FileSpec ret (path_to_shlib.c_str(), false); + + FileSpec xcode_binary_path = ret; + xcode_binary_path.AppendPathComponent("MacOS"); + xcode_binary_path.AppendPathComponent("Xcode"); + + if (xcode_binary_path.Exists()) + { + return ret; + } } } return FileSpec(); |