[Differential] [Request, 489 lines] D2375: GDB/LLDB plugin: correctly handle string escaping and unescaping
qi437103 (Aetf)
noreply at phabricator.kde.org
Tue Aug 9 02:03:34 UTC 2016
qi437103 created this revision.
qi437103 added a reviewer: apol.
Restricted Application added a subscriber: kdevelop-devel.
REVISION SUMMARY
- Fix wrong implementation of quoteExpression/unquoteExpression, add unit tests for it
quoteExpression is used in MIVariable when creating new watch variables, original code didn't
escape '\\' in the expression, so the user can't input expression containing '\\'.
unqouteExpression in used in MIBreakpointcontroller to extract path from breakpoint notification
emitted from debugger, because GDB escapes these paths twice, so after regular unescape happens when
parsing the MI response, extra escape is needed.
However, in practice, neither GDB nor LLDB can handle reliably paths with special characters
like '\\' or '\"', so no unit test is added to verify the use of unquoteExpression.
- Improve LLDB data formatter output for non-ascii char, which should be displayed in UI correctly.
LLDB emits unicode escape sequence for non-ascii code. Correct unescape them in the UI.
TEST PLAN
Added/Changed unit tests:
- GdbTest::testVariablesWatchesQuotes
- LldbTest::testVariablesWatchesQuotes
- LldbTest::testVariablesNonascii
REPOSITORY
rKDEVELOP KDevelop
BRANCH
variable
REVISION DETAIL
https://phabricator.kde.org/D2375
AFFECTED FILES
debuggers/common/mivariable.cpp
debuggers/common/mivariable.h
debuggers/common/stringhelpers.cpp
debuggers/common/stringhelpers.h
debuggers/gdb/unittests/test_gdb.cpp
debuggers/lldb/controllers/variable.cpp
debuggers/lldb/controllers/variable.h
debuggers/lldb/debugsession.cpp
debuggers/lldb/debugsession.h
debuggers/lldb/formatters/helpers.py
debuggers/lldb/formatters/qt.py
debuggers/lldb/unittests/debugees/debugeeqt.cpp
debuggers/lldb/unittests/test_lldb.cpp
debuggers/lldb/unittests/test_lldb.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: qi437103, apol
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160809/5e3d3a2b/attachment.html>
More information about the KDevelop-devel
mailing list