[Lldb-commits] [PATCH] D138060: Improve error logging when xcrun fails to execute successfully
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 15 14:04:53 PST 2022
kastiglione added inline comments.
================
Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:384
- Log *log = GetLog(LLDBLog::Host);
+ Log *log = GetLog(LLDBLog::Host | LLDBLog::Types);
if (log) {
----------------
Maybe a comment explaining how this is useful in the Types category.
================
Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:396
Host::RunShellCommand(args, FileSpec(), &status, &signo, &output_str,
- std::chrono::seconds(15));
+ std::chrono::seconds(30));
----------------
Why is the timeout increased?
================
Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:399-406
+ if (error.Fail()) {
+ LLDB_LOG(log, "xcrun failed to execute: %s", error.AsCString());
+ return {};
+ }
+ if (status != 0) {
+ LLDB_LOG(log, "xcrun returned exit code %d", status);
return {};
----------------
Should this produce a diagnostic? Seems like failure here should be surfaced to the user.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138060/new/
https://reviews.llvm.org/D138060
More information about the lldb-commits
mailing list