Make kwin_wayland remotely debuggable

Differential Revision: https://phabricator.kde.org/D6160
This commit is contained in:
Oleg Chernovskiy 2017-06-11 22:16:56 +03:00
parent 155b6ecb3b
commit d8ec2e0466

View file

@ -408,7 +408,9 @@ static void disablePtrace()
#if HAVE_PR_SET_DUMPABLE
// check whether we are running under a debugger
const QFileInfo parent(QStringLiteral("/proc/%1/exe").arg(getppid()));
if (parent.isSymLink() && parent.symLinkTarget().endsWith(QLatin1String("/gdb"))) {
if (parent.isSymLink() &&
(parent.symLinkTarget().endsWith(QLatin1String("/gdb")) ||
parent.symLinkTarget().endsWith(QLatin1String("/gdbserver")))) {
// debugger, don't adjust
return;
}