summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatManager.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-01-12 01:00:22 +0000
committerEnrico Granata <egranata@apple.com>2013-01-12 01:00:22 +0000
commit3309d881989abe5fb630631ccd7333daa3c1707a (patch)
treee8b0a0483ef8c017bf657ca9dc9acb0cd3b47954 /lldb/source/Core/FormatManager.cpp
parent3dd236cdd8e5be401b7d7235c7a1aecb1c7450e0 (diff)
downloadbcm5719-llvm-3309d881989abe5fb630631ccd7333daa3c1707a.tar.gz
bcm5719-llvm-3309d881989abe5fb630631ccd7333daa3c1707a.zip
<rdar://problem/12239827>
Providing a data formatter for libc++ std::wstring In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited Also, providing a new API on the ValueObject to navigate a hierarchy by index-path Lastly, an appropriate test case is included llvm-svn: 172282
Diffstat (limited to 'lldb/source/Core/FormatManager.cpp')
-rw-r--r--lldb/source/Core/FormatManager.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp
index 184d65e1cf3..144ddbff37c 100644
--- a/lldb/source/Core/FormatManager.cpp
+++ b/lldb/source/Core/FormatManager.cpp
@@ -844,9 +844,12 @@ FormatManager::LoadLibcxxFormatters()
.SetHideItemNames(false);
#ifndef LLDB_DISABLE_PYTHON
- std::string code(" lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,internal_dict)");
- lldb::TypeSummaryImplSP std_string_summary_sp(new ScriptSummaryFormat(stl_summary_flags, "lldb.formatters.cpp.libcxx.stdstring_SummaryProvider",code.c_str()));
+ //std::string code(" lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,internal_dict)");
+ //lldb::TypeSummaryImplSP std_string_summary_sp(new ScriptSummaryFormat(stl_summary_flags, "lldb.formatters.cpp.libcxx.stdstring_SummaryProvider",code.c_str()));
+ lldb::TypeSummaryImplSP std_string_summary_sp(new CXXFunctionSummaryFormat(stl_summary_flags, lldb_private::formatters::LibcxxStringSummaryProvider, "std::string summary provider"));
+ lldb::TypeSummaryImplSP std_wstring_summary_sp(new CXXFunctionSummaryFormat(stl_summary_flags, lldb_private::formatters::LibcxxWStringSummaryProvider, "std::wstring summary provider"));
+
TypeCategoryImpl::SharedPointer libcxx_category_sp = GetCategory(m_libcxx_category_name);
libcxx_category_sp->GetSummaryNavigator()->Add(ConstString("std::__1::string"),
@@ -854,6 +857,11 @@ FormatManager::LoadLibcxxFormatters()
libcxx_category_sp->GetSummaryNavigator()->Add(ConstString("std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >"),
std_string_summary_sp);
+ libcxx_category_sp->GetSummaryNavigator()->Add(ConstString("std::__1::wstring"),
+ std_wstring_summary_sp);
+ libcxx_category_sp->GetSummaryNavigator()->Add(ConstString("std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >"),
+ std_wstring_summary_sp);
+
SyntheticChildren::Flags stl_synth_flags;
stl_synth_flags.SetCascades(true).SetSkipPointers(false).SetSkipReferences(false);
OpenPOWER on IntegriCloud