@@ -1409,7 +1409,7 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
14091409 stl_synth_flags,
14101410 " lldb.formatters.cpp.gnu_libstdcpp.StdVectorSynthProvider" )));
14111411 cpp_category_sp->AddTypeSynthetic (
1412- " ^std::( __debug::)? map<.+> >(( )?&)?$" , eFormatterMatchRegex,
1412+ " ^std::__debug::map<.+> >(( )?&)?$" , eFormatterMatchRegex,
14131413 SyntheticChildrenSP (new ScriptedSyntheticChildren (
14141414 stl_synth_flags,
14151415 " lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
@@ -1419,17 +1419,17 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
14191419 stl_deref_flags,
14201420 " lldb.formatters.cpp.gnu_libstdcpp.StdDequeSynthProvider" )));
14211421 cpp_category_sp->AddTypeSynthetic (
1422- " ^std::( __debug::)? set<.+> >(( )?&)?$" , eFormatterMatchRegex,
1422+ " ^std::__debug::set<.+> >(( )?&)?$" , eFormatterMatchRegex,
14231423 SyntheticChildrenSP (new ScriptedSyntheticChildren (
14241424 stl_deref_flags,
14251425 " lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
14261426 cpp_category_sp->AddTypeSynthetic (
1427- " ^std::( __debug::)? multimap<.+> >(( )?&)?$" , eFormatterMatchRegex,
1427+ " ^std::__debug::multimap<.+> >(( )?&)?$" , eFormatterMatchRegex,
14281428 SyntheticChildrenSP (new ScriptedSyntheticChildren (
14291429 stl_deref_flags,
14301430 " lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
14311431 cpp_category_sp->AddTypeSynthetic (
1432- " ^std::( __debug::)? multiset<.+> >(( )?&)?$" , eFormatterMatchRegex,
1432+ " ^std::__debug::multiset<.+> >(( )?&)?$" , eFormatterMatchRegex,
14331433 SyntheticChildrenSP (new ScriptedSyntheticChildren (
14341434 stl_deref_flags,
14351435 " lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
@@ -1462,15 +1462,15 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
14621462 " libstdc++ std::__debug::vector summary provider" ,
14631463 " ^std::__debug::vector<.+>(( )?&)?$" , stl_summary_flags, true );
14641464
1465- AddCXXSummary (
1466- cpp_category_sp, lldb_private::formatters::ContainerSizeSummaryProvider,
1467- " libstdc++ std::map summary provider" ,
1468- " ^std::( __debug::)? map<.+> >(( )?&)?$" , stl_summary_flags, true );
1465+ AddCXXSummary (cpp_category_sp,
1466+ lldb_private::formatters::ContainerSizeSummaryProvider,
1467+ " libstdc++ debug std::map summary provider" ,
1468+ " ^std::__debug::map<.+> >(( )?&)?$" , stl_summary_flags, true );
14691469
1470- AddCXXSummary (
1471- cpp_category_sp, lldb_private::formatters::ContainerSizeSummaryProvider,
1472- " libstdc++ std::set summary provider" ,
1473- " ^std::( __debug::)? set<.+> >(( )?&)?$" , stl_summary_flags, true );
1470+ AddCXXSummary (cpp_category_sp,
1471+ lldb_private::formatters::ContainerSizeSummaryProvider,
1472+ " libstdc++ debug std::set summary provider" ,
1473+ " ^std::__debug::set<.+> >(( )?&)?$" , stl_summary_flags, true );
14741474
14751475 AddCXXSummary (
14761476 cpp_category_sp, lldb_private::formatters::ContainerSizeSummaryProvider,
@@ -1479,13 +1479,13 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
14791479
14801480 AddCXXSummary (
14811481 cpp_category_sp, lldb_private::formatters::ContainerSizeSummaryProvider,
1482- " libstdc++ std::multimap summary provider" ,
1483- " ^std::( __debug::)? multimap<.+> >(( )?&)?$" , stl_summary_flags, true );
1482+ " libstdc++ debug std::multimap summary provider" ,
1483+ " ^std::__debug::multimap<.+> >(( )?&)?$" , stl_summary_flags, true );
14841484
14851485 AddCXXSummary (
14861486 cpp_category_sp, lldb_private::formatters::ContainerSizeSummaryProvider,
1487- " libstdc++ std::multiset summary provider" ,
1488- " ^std::( __debug::)? multiset<.+> >(( )?&)?$" , stl_summary_flags, true );
1487+ " libstdc++ debug std::multiset summary provider" ,
1488+ " ^std::__debug::multiset<.+> >(( )?&)?$" , stl_summary_flags, true );
14891489
14901490 AddCXXSummary (cpp_category_sp,
14911491 lldb_private::formatters::ContainerSizeSummaryProvider,
@@ -1672,6 +1672,18 @@ GenericUnorderedSyntheticFrontEndCreator(CXXSyntheticChildren *children,
16721672 *valobj_sp);
16731673}
16741674
1675+ static SyntheticChildrenFrontEnd *
1676+ GenericMapLikeSyntheticFrontEndCreator (CXXSyntheticChildren *children,
1677+ ValueObjectSP valobj_sp) {
1678+ if (!valobj_sp)
1679+ return nullptr ;
1680+
1681+ if (IsMsvcStlMapLike (*valobj_sp))
1682+ return MsvcStlMapLikeSyntheticFrontEndCreator (valobj_sp);
1683+ return new ScriptedSyntheticChildren::FrontEnd (
1684+ " lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" , *valobj_sp);
1685+ }
1686+
16751687// / Load formatters that are formatting types from more than one STL
16761688static void LoadCommonStlFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
16771689 if (!cpp_category_sp)
@@ -1749,6 +1761,10 @@ static void LoadCommonStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
17491761 AddCXXSynthetic (cpp_category_sp, GenericOptionalSyntheticFrontEndCreator,
17501762 " std::optional synthetic children" ,
17511763 " ^std::optional<.+>(( )?&)?$" , stl_deref_flags, true );
1764+ AddCXXSynthetic (cpp_category_sp, GenericMapLikeSyntheticFrontEndCreator,
1765+ " std::(multi)?map/set synthetic children" ,
1766+ " ^std::(multi)?(map|set)<.+>(( )?&)?$" , stl_synth_flags,
1767+ true );
17521768
17531769 AddCXXSummary (cpp_category_sp, GenericSmartPointerSummaryProvider,
17541770 " MSVC STL/libstdc++ std::shared_ptr summary provider" ,
@@ -1786,6 +1802,10 @@ static void LoadCommonStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
17861802 " MSVC STL/libstdc++ std unordered container summary provider" ,
17871803 " ^std::unordered_(multi)?(map|set)<.+> ?>$" , stl_summary_flags,
17881804 true );
1805+ AddCXXSummary (cpp_category_sp, ContainerSizeSummaryProvider,
1806+ " MSVC STL/libstdc++ std::(multi)?map/set summary provider" ,
1807+ " ^std::(multi)?(map|set)<.+>(( )?&)?$" , stl_summary_flags,
1808+ true );
17891809}
17901810
17911811static void LoadMsvcStlFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
@@ -1834,6 +1854,14 @@ static void LoadMsvcStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
18341854 AddCXXSummary (cpp_category_sp, MsvcStlAtomicSummaryProvider,
18351855 " MSVC STL std::atomic summary provider" , " ^std::atomic<.+>$" ,
18361856 stl_summary_flags, true );
1857+ AddCXXSynthetic (cpp_category_sp, MsvcStlTreeIterSyntheticFrontEndCreator,
1858+ " MSVC STL tree iterator synthetic children" ,
1859+ " ^std::_Tree(_const)?_iterator<.+>(( )?&)?$" , stl_synth_flags,
1860+ true );
1861+ AddCXXSummary (cpp_category_sp, MsvcStlTreeIterSummaryProvider,
1862+ " MSVC STL tree iterator summary" ,
1863+ " ^std::_Tree(_const)?_iterator<.+>(( )?&)?$" , stl_summary_flags,
1864+ true );
18371865}
18381866
18391867static void LoadSystemFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
0 commit comments