[Lldb-commits] [lldb] Also log the error output from xcrun, if it fails. (PR #70716)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 30 13:16:56 PDT 2023
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/70716
In the rare case that an Xcode installation is damaged, this output could contain clues to further diagnose the issue.
rdar://117698630
>From 8a3b45751c033483266e91b30af22d5bd8d17e2c Mon Sep 17 00:00:00 2001
From: Adrian Prantl <aprantl at apple.com>
Date: Mon, 30 Oct 2023 13:11:02 -0700
Subject: [PATCH] Also log the error output from xcrun, if it fails.
In the rare case that an Xcode installation is damaged, this output
could contain clues to further diagnose the issue.
rdar://117698630
---
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index e3506a01c606b78..f2a4d5729f29871 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
// different 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