================ @@ -1039,7 +1039,12 @@ ResolveSDKPathFromDebugInfo(lldb_private::Target *target) { SymbolFile *sym_file = exe_module_sp->GetSymbolFile(); if (!sym_file) - return llvm::createStringError("Failed to get symbol file from module"); + return llvm::createStringError("Failed to get symbol file from executable"); + + if (sym_file->GetNumCompileUnits() == 0) + return llvm::createStringError( + "Failed to resolve SDK for target: executable's symbol file has no " + "compile units"); XcodeSDK merged_sdk; for (unsigned i = 0; i < sym_file->GetNumCompileUnits(); ++i) { ---------------- kastiglione wrote:
note that `merged_sdk` will be empty if there are no compile units, but the code assumes the loop produces a non-empty sdk. https://github.com/llvm/llvm-project/pull/154607 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits