<table><tr><td style="">croick created this revision.<br />croick added a reviewer: Frameworks.<br />Restricted Application added a project: Frameworks.<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/D11236">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">also see bug 245529</li>
<li class="remarkup-list-item">If DrKonqi suggests debugging the crashed application with an external debugger, this right should be transferred to the debugger.</li>
<li class="remarkup-list-item">The patch opens a socket connection which allows DrKonqi to request a transfer of this right to the debugger.</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 <a href="https://phabricator.kde.org/D11235" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D11235</a></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>R285 KCrash</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/D11236">https://phabricator.kde.org/D11236</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kcrash.cpp</div></div></div><br /><div><strong>To: </strong>croick, Frameworks<br /><strong>Cc: </strong>michaelh<br /></div>