Author: spyffe Date: Thu Nov 5 13:46:12 2015 New Revision: 252198 URL: http://llvm.org/viewvc/llvm-project?rev=252198&view=rev Log: 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. Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=252198&r1=252197&r2=252198&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu Nov 5 13:46:12 2015 @@ -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(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits