diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -409,6 +409,10 @@ } } else { result.AppendErrorWithFormat("attach failed: %s\n", error.AsCString()); + result.AppendMessage( + "Could not attach to process. If your uid matches the uid of the target process, \n" + "check the setting of /proc/sys/kernel/yama/ptrace_scope, \n" + "or try again as the root user. \n"); } if (!result.Succeeded())