This revision was automatically updated to reflect the committed changes. Closed by commit rGbe237b76da7e: [lldb] Improve error message when trying to debug a non-debuggable process (authored by JDevlieghere). Herald added a project: LLDB.
Changed prior to commit: https://reviews.llvm.org/D157640?vs=549119&id=549459#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157640/new/ https://reviews.llvm.org/D157640 Files: lldb/tools/debugserver/source/DNB.cpp Index: lldb/tools/debugserver/source/DNB.cpp =================================================================== --- lldb/tools/debugserver/source/DNB.cpp +++ 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 {
Index: lldb/tools/debugserver/source/DNB.cpp =================================================================== --- lldb/tools/debugserver/source/DNB.cpp +++ 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 {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits