<table><tr><td style="">qi437103 created this revision.<br />qi437103 added a reviewer: apol.<br />Restricted Application added a subscriber: kdevelop-devel.</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/D2375" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Fix wrong implementation of quoteExpression/unquoteExpression, add unit tests for it</li>
</ul>
<p>quoteExpression is used in MIVariable when creating new watch variables, original code didn't<br />
escape '\\' in the expression, so the user can't input expression containing '\\'.</p>
<p>unqouteExpression in used in MIBreakpointcontroller to extract path from breakpoint notification<br />
emitted from debugger, because GDB escapes these paths twice, so after regular unescape happens when<br />
parsing the MI response, extra escape is needed.</p>
<p>However, in practice, neither GDB nor LLDB can handle reliably paths with special characters<br />
like '\\' or '\"', so no unit test is added to verify the use of unquoteExpression.</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Improve LLDB data formatter output for non-ascii char, which should be displayed in UI correctly.</li>
</ul>
<p>LLDB emits unicode escape sequence for non-ascii code. Correct unescape them in the UI.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Added/Changed unit tests:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">GdbTest::testVariablesWatchesQuotes</li>
<li class="remarkup-list-item">LldbTest::testVariablesWatchesQuotes</li>
<li class="remarkup-list-item">LldbTest::testVariablesNonascii</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKDEVELOP KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>variable</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2375" rel="noreferrer">https://phabricator.kde.org/D2375</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>debuggers/common/mivariable.cpp<br />
debuggers/common/mivariable.h<br />
debuggers/common/stringhelpers.cpp<br />
debuggers/common/stringhelpers.h<br />
debuggers/gdb/unittests/test_gdb.cpp<br />
debuggers/lldb/controllers/variable.cpp<br />
debuggers/lldb/controllers/variable.h<br />
debuggers/lldb/debugsession.cpp<br />
debuggers/lldb/debugsession.h<br />
debuggers/lldb/formatters/helpers.py<br />
debuggers/lldb/formatters/qt.py<br />
debuggers/lldb/unittests/debugees/debugeeqt.cpp<br />
debuggers/lldb/unittests/test_lldb.cpp<br />
debuggers/lldb/unittests/test_lldb.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>qi437103, apol<br /><strong>Cc: </strong>kdevelop-devel<br /></div>