<table><tr><td style="">rjvbb marked 4 inline comments as done.<br />rjvbb added inline comments.
</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/D4929" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4929#inline-20233" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfunk</span> wrote in <span style="color: #4b4d51; font-weight: bold;">backtracegenerator.cpp:62</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Please do this only if <tt style="background: #ebebeb; font-size: 13px;">lldb</tt> is used then. No need to change code which apparently worked fine for years. Also, did you try <tt style="background: #ebebeb; font-size: 13px;">QProcess::terminate</tt> instead?</p>
<p style="padding: 0; margin: 8px;">PS: <tt style="background: #ebebeb; font-size: 13px;">QProcess</tt> gets unhappy when being deleted while still running (=> runtime warnings).</p>
<p style="padding: 0; margin: 8px;">PPS: Please read my other advice about quitting LLDB below, too</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">It's been a while, QProcess::terminate() was an approach I remember preferring to avoid possibly because it also led to runtime warnings. I also don't think there's much of a difference in what ::kill() and ::terminate() do.<br />
With deleteLater() I rarely if ever see warning messages, probably because it's an implicit way of waiting long enough (in the background) for lldb to exit.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4929#inline-20240" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfunk</span> wrote in <span style="color: #4b4d51; font-weight: bold;">backtracegenerator.cpp:144</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">This whole logic looks really cumbersome.</p>
<p style="padding: 0; margin: 8px;">Is there really no way to exit LLDB cleanly after detach?</p>
<p style="padding: 0; margin: 8px;"><a href="http://stackoverflow.com/questions/26267289/how-can-i-exit-lldb-after-running-commands-with-o" class="remarkup-link" target="_blank" rel="noreferrer">http://stackoverflow.com/questions/26267289/how-can-i-exit-lldb-after-running-commands-with-o</a> suggests there is:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">lldb /bin/ls -o "run" -o "script import os; os._exit(1)"</pre></div>
<p style="padding: 0; margin: 8px;">I take it not everyone's got Python on they system, but this works for me as well:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">lldb -p $(pidof kate) -o detach -o quit</pre></div>
<p style="padding: 0; margin: 8px;">Just put that into the <tt style="background: #ebebeb; font-size: 13px;">-o quit</tt> in the lldbrc?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">-o quit</tt> indeed works with newer lldb versions, but not yet with the system version on OS X 10.9 .</p>
<p style="padding: 0; margin: 8px;">I suppose I could do a combination of both. The logical way would be <tt style="background: #ebebeb; font-size: 13px;">\nquit\nscript import os; os._exit(0)</tt> but processing stops after the quit command so it'd have to be the opposite. I'd have to test this for a bit.</p>
<p style="padding: 0; margin: 8px;">Not having a python interpreter may not be an issue. I don't know how its complete absence is treated but errors in the python expression (loading an inexisting module for instance) don't stop processing of subsequent commands.</p>
<p style="padding: 0; margin: 8px;">Can one put comments in the lldbrc file explaining the reason of the surprising BatchCommands set?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4929#inline-20239" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfunk</span> wrote in <span style="color: #4b4d51; font-weight: bold;">AppleTerminal:1</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Please explain why this file is needed(?)</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">It is required to attach lldb in a terminal window on Mac using the native terminal application. I don't want to rely on konsole being installed there, in part because that application has issues with certain Control keystrokes under Qt5 (including Ctrl-C and family).</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4929#inline-20234" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfunk</span> wrote in <span style="color: #4b4d51; font-weight: bold;">drkonqibackends.cpp:165</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Why these special conditions? Needs comments.</p>
<p style="padding: 0; margin: 8px;">Whether to use or not to use lldb on a particular OS X version should be runtime decision, too.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Actually, there can be a runtime decision to use lldb on earlier (10.7-) versions but not on later versions. Gdb doesn't work properly from 10.8 onwards. And to be honest lldb was in such an early stage in 10.7 and earlier that you wouldn't want to use the system version there.<br />
Given that gdb still works there it seems unnecessarily complicated to make this a runtime decision. Esp. since using gdb means you get access to the standard backtrace parser.</p>
<p style="padding: 0; margin: 8px;">I'll put a concise version of this explanation as a comment.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D4929#inline-20237" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfunk</span> wrote in <span style="color: #4b4d51; font-weight: bold;">backtraceparserlldb.cpp:26</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Style: Use <tt style="background: #ebebeb; font-size: 13px;">const QString &line</tt></p>
<p style="padding: 0; margin: 8px;">More of these issues in other lines</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I think I preserved the style in the backtracerparser implementation I cloned...</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4929" rel="noreferrer">https://phabricator.kde.org/D4929</a></div></div><br /><div><strong>To: </strong>rjvbb, Plasma: Workspaces, kfunk<br /><strong>Cc: </strong>kfunk, mart, broulik, kde-mac, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>