[Lldb-commits] [lldb] Also log the error output from xcrun, if it fails. (PR #70716)

via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 30 13:18:08 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Adrian Prantl (adrian-prantl)

<details>
<summary>Changes</summary>

In the  rare case that an  Xcode installation is damaged,  this output could contain clues to further diagnose the issue.

rdar://117698630

---
Full diff: https://github.com/llvm/llvm-project/pull/70716.diff


1 Files Affected:

- (modified) lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm (+2) 


``````````diff
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()) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/70716


More information about the lldb-commits mailing list