Author: Jason Molenda Date: 2020-02-11T16:18:49-08:00 New Revision: f9fdd1172c8b326126463f1efcfee721e5222334
URL: https://github.com/llvm/llvm-project/commit/f9fdd1172c8b326126463f1efcfee721e5222334 DIFF: https://github.com/llvm/llvm-project/commit/f9fdd1172c8b326126463f1efcfee721e5222334.diff LOG: Rewrite default "could not attach" msg to point to hints about where more information can be found about why it may have failed. <rdar://problem/59277928> Added: Modified: lldb/tools/debugserver/source/RNBRemote.cpp Removed: ################################################################################ diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 87aca91c00c4..8eed06381d3a 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -4076,6 +4076,16 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { std::string error_explainer = "attach failed"; if (err_str[0] != '\0') { + // This is not a super helpful message for end users + if (strcmp (err_str, "unable to start the exception thread") == 0) { + snprintf (err_str, sizeof (err_str) - 1, + "Not allowed to attach to process. Look in the console " + "messages (Console.app), near the debugserver entries " + "when the attached failed. The subsystem that denied " + "the attach permission will likely have logged an " + "informative message about why it was denied."); + err_str[sizeof (err_str) - 1] = '\0'; + } error_explainer += " ("; error_explainer += err_str; error_explainer += ")"; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits