<table><tr><td style="">croick created this revision.<br />croick added reviewers: Plasma: Workspaces, Frameworks.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.<br />croick requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11235">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">In Linux recent kernels only allow attaching of processes to a debugger, if<ul class="remarkup-list">
<li class="remarkup-list-item">the right to attach to processes is enabled system-wide</li>
<li class="remarkup-list-item">the debugger is a child process of the debuggee</li>
<li class="remarkup-list-item">or the debuggee grants access by a call to prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0);</li>
</ul></li>
<li class="remarkup-list-item">DrKonqi cannot do this directly, so it will ask the debuggee to do so by a socket connection.</li>
<li class="remarkup-list-item">When the debugger has finished, the access is requested back to DrKonqi to allow internal backtraces again.</li>
</ul></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">try to attach the debugged process to gdb or KDevelop by using the debug button: operation will not be permitted</li>
<li class="remarkup-list-item">apply corresponding patches to KCrash and DrKonqi</li>
<li class="remarkup-list-item">the process can now be debugged</li>
<li class="remarkup-list-item">after detaching the process again, a backtrace can be created using the DrKonqi dialog as usual</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R871 DrKonqi</div></div></div><br /><div><strong>BRANCH</strong><div><div>ptracer</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11235">https://phabricator.kde.org/D11235</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/debuggerlaunchers.cpp<br />
src/debuggerlaunchers.h<br />
src/queryptrace.cpp<br />
src/queryptrace.h<br />
src/tests/crashtest/crashtest.cpp</div></div></div><br /><div><strong>To: </strong>croick, Plasma: Workspaces, Frameworks<br /><strong>Cc: </strong>plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>