Fix debugging of terminal applications on Linux

On modern linux distributions (Ubuntu >= 10.10, Debian >= Wheezy),
trying to debug a terminal application fails, with
"ptrace: Operation not permitted".

In order to allow the debugger to attach to the created process, the
process itself needs to inform the kernel of the debugging process.

Task-number: QTCREATORBUG-3509
Change-Id: I68670426fad18cbe3b7cce9d57633e58e631e025
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Orgad Shaneh
2014-05-14 11:26:20 +03:00
committed by Orgad Shaneh
parent 4f62d65174
commit a075bad97f
2 changed files with 13 additions and 0 deletions

View File

@@ -162,6 +162,7 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
<< msgPromptToClose()
<< workingDirectory()
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
<< QString::number(getpid())
<< pcmd << pargs.toUnixArgs();
QString xterm = allArgs.takeFirst();