Request change of ptrace scope from KCrash
- On Linux recent kernels only allow attaching a debugger to a process if
- the right to attach to processes is enabled system-wide
- the debugger is an ancestor of the debuggee
- or the debuggee sets a tracer process by a call to prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0);
- DrKonqi will ask the debuggee by a socket connection to set a new ptracer. This is required if an external debugger is started (using the usually hidden Debug button).
- When the debugger has finished, the access is requested back to DrKonqi to allow internal backtraces again.
- try to attach gdb or KDevelop to the process by using the Debug button: operation will not be permitted
- apply corresponding patches to KCrash D11236 and DrKonqi
- the process can now be debugged
- after detaching the debugger again, a backtrace can be created using the DrKonqi dialog as usual
Reviewed By: ossi
Subscribers: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel
Differential Revision: https://phabricator.kde.org/D11235