added a detailed error description if ptrace is not permitted

Change-Id: I555fddcabdd2311e55907073c15d5627d3283a73
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
David Schulz
2012-01-02 10:42:01 +01:00
committed by hjk
parent 34933799fa
commit fad4599174
4 changed files with 34 additions and 3 deletions

View File

@@ -113,6 +113,24 @@ QString DumperHelper::msgDumperOutdated(double requiredVersion, double currentVe
arg(currentVersion).arg(requiredVersion);
}
QString DumperHelper::msgPtraceError(DebuggerStartMode sm)
{
if (sm == StartInternal) {
return QCoreApplication::translate("QtDumperHelper",
"ptrace: Operation not permitted.\n\n"
"Could not attach to the process. Check the settings of\n"
"/proc/sys/kernel/yama/ptrace_scope\n"
"For more details, see/etc/sysctl.d/10-ptrace.conf\n");
} else {
return QCoreApplication::translate("QtDumperHelper",
"ptrace: Operation not permitted.\n\n"
"Could not attach to the process. If your uid matches the uid\n"
"of the target process, check the settings of\n"
"/proc/sys/kernel/yama/ptrace_scope\n"
"For more details, see/etc/sysctl.d/10-ptrace.conf\n");
}
}
static inline void formatQtVersion(int v, QTextStream &str)
{
str << ((v >> 16) & 0xFF) << '.' << ((v >> 8) & 0xFF) << '.' << (v & 0xFF);