[Lldb-commits] [lldb] r252198 - Better validation when we think a directory might be Xcode.app.
Sean Callanan via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 5 11:46:13 PST 2015
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();
More information about the lldb-commits
mailing list