[Lldb-commits] [lldb] 15733fe - Also log the error output from xcrun, if it fails. (#70716)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 31 15:36:11 PDT 2023
Author: Adrian Prantl
Date: 2023-10-31T15:36:06-07:00
New Revision: 15733fe5f3cbf36ad1c9fbb0c6e4f31fdec224fa
URL: https://github.com/llvm/llvm-project/commit/15733fe5f3cbf36ad1c9fbb0c6e4f31fdec224fa
DIFF: https://github.com/llvm/llvm-project/commit/15733fe5f3cbf36ad1c9fbb0c6e4f31fdec224fa.diff
LOG: Also log the error output from xcrun, if it fails. (#70716)
In the rare case that an Xcode installation is damaged, this output
could contain clues to further diagnose the issue.
rdar://117698630
Added:
Modified:
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
Removed:
################################################################################
diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index 33d94504fe70f8c..110a01732b2473a 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -417,6 +417,8 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
// xcrun didn't find a matching SDK. Not an error, we'll try
//
diff erent spellings.
LLDB_LOG(log, "xcrun returned exit code {0}", status);
+ if (!output_str.empty())
+ LLDB_LOG(log, "xcrun output was:\n{0}", output_str);
return "";
}
if (output_str.empty()) {
More information about the lldb-commits
mailing list