diff options
| author | Dawn Perchik <dawn@burble.org> | 2015-10-07 19:55:33 +0000 |
|---|---|---|
| committer | Dawn Perchik <dawn@burble.org> | 2015-10-07 19:55:33 +0000 |
| commit | 74b8f4cbdf62b0b6944ab109782f633733a67e98 (patch) | |
| tree | d120b94a505dabccf6eb5d9299c22a38fde2e313 /lldb/source/API | |
| parent | af6980c70ac45a9941dde930005807f00bd80f51 (diff) | |
| download | bcm5719-llvm-74b8f4cbdf62b0b6944ab109782f633733a67e98.tar.gz bcm5719-llvm-74b8f4cbdf62b0b6944ab109782f633733a67e98.zip | |
[lldb-mi] Fix evaluation of strings containing characters from non-ascii range
If a string contained characters outside the ASCII range, lldb-mi would
print them as hexadecimal codes. This patch fixes this behaviour by
converting to UTF-8 instead, by having lldb-mi use registered type
summary providers, when they are available. This patch also fixes
incorrect evaluation of some composite types, like std::string, by
having them use a type registered type summary provider.
Based on patch from evgeny.leviant@gmail.com
Reviewed by: ki.stfu, granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13058
llvm-svn: 249597
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBTypeSummary.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/API/SBTypeSummary.cpp b/lldb/source/API/SBTypeSummary.cpp index b1fa4007814..63af9aadcfa 100644 --- a/lldb/source/API/SBTypeSummary.cpp +++ b/lldb/source/API/SBTypeSummary.cpp @@ -8,9 +8,8 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBTypeSummary.h" - #include "lldb/API/SBStream.h" - +#include "lldb/API/SBValue.h" #include "lldb/DataFormatters/DataVisualization.h" using namespace lldb; @@ -284,6 +283,15 @@ SBTypeSummary::GetDescription (lldb::SBStream &description, } } +bool +SBTypeSummary::DoesPrintValue (lldb::SBValue value) +{ + if (!IsValid()) + return false; + lldb::ValueObjectSP value_sp = value.GetSP(); + return m_opaque_sp->DoesPrintValue(value_sp.get()); +} + lldb::SBTypeSummary & SBTypeSummary::operator = (const lldb::SBTypeSummary &rhs) { |

