diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -382,11 +382,22 @@ if (err_str && err_len > 0) { if (launch_err.AsString()) { ::snprintf(err_str, err_len, - "failed to get the task for process %i (%s)", pid, + "failed to get the task for process %i: %s", pid, launch_err.AsString()); } else { + + const char *ent_name = +#if TARGET_OS_OSX + "com.apple.security.get-task-allow"; +#else + "get-task-allow"; +#endif ::snprintf(err_str, err_len, - "failed to get the task for process %i", pid); + "failed to get the task for process %i: this likely " + "means the process cannot be debugged, either because " + "it's a system process or because the process is " + "missing the %s entitlement.", + pid, ent_name); } } } else {