@@ -1409,7 +1409,7 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1409
1409
stl_synth_flags,
1410
1410
" lldb.formatters.cpp.gnu_libstdcpp.StdVectorSynthProvider" )));
1411
1411
cpp_category_sp->AddTypeSynthetic (
1412
- " ^std::( __debug::)? map<.+> >(( )?&)?$" , eFormatterMatchRegex,
1412
+ " ^std::__debug::map<.+> >(( )?&)?$" , eFormatterMatchRegex,
1413
1413
SyntheticChildrenSP (new ScriptedSyntheticChildren (
1414
1414
stl_synth_flags,
1415
1415
" lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
@@ -1419,17 +1419,17 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1419
1419
stl_deref_flags,
1420
1420
" lldb.formatters.cpp.gnu_libstdcpp.StdDequeSynthProvider" )));
1421
1421
cpp_category_sp->AddTypeSynthetic (
1422
- " ^std::( __debug::)? set<.+> >(( )?&)?$" , eFormatterMatchRegex,
1422
+ " ^std::__debug::set<.+> >(( )?&)?$" , eFormatterMatchRegex,
1423
1423
SyntheticChildrenSP (new ScriptedSyntheticChildren (
1424
1424
stl_deref_flags,
1425
1425
" lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
1426
1426
cpp_category_sp->AddTypeSynthetic (
1427
- " ^std::( __debug::)? multimap<.+> >(( )?&)?$" , eFormatterMatchRegex,
1427
+ " ^std::__debug::multimap<.+> >(( )?&)?$" , eFormatterMatchRegex,
1428
1428
SyntheticChildrenSP (new ScriptedSyntheticChildren (
1429
1429
stl_deref_flags,
1430
1430
" lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
1431
1431
cpp_category_sp->AddTypeSynthetic (
1432
- " ^std::( __debug::)? multiset<.+> >(( )?&)?$" , eFormatterMatchRegex,
1432
+ " ^std::__debug::multiset<.+> >(( )?&)?$" , eFormatterMatchRegex,
1433
1433
SyntheticChildrenSP (new ScriptedSyntheticChildren (
1434
1434
stl_deref_flags,
1435
1435
" lldb.formatters.cpp.gnu_libstdcpp.StdMapLikeSynthProvider" )));
@@ -1462,15 +1462,15 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1462
1462
" libstdc++ std::__debug::vector summary provider" ,
1463
1463
" ^std::__debug::vector<.+>(( )?&)?$" , stl_summary_flags, true );
1464
1464
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 );
1469
1469
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 );
1474
1474
1475
1475
AddCXXSummary (
1476
1476
cpp_category_sp, lldb_private::formatters::ContainerSizeSummaryProvider,
@@ -1479,13 +1479,13 @@ static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1479
1479
1480
1480
AddCXXSummary (
1481
1481
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 );
1484
1484
1485
1485
AddCXXSummary (
1486
1486
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 );
1489
1489
1490
1490
AddCXXSummary (cpp_category_sp,
1491
1491
lldb_private::formatters::ContainerSizeSummaryProvider,
@@ -1672,6 +1672,18 @@ GenericUnorderedSyntheticFrontEndCreator(CXXSyntheticChildren *children,
1672
1672
*valobj_sp);
1673
1673
}
1674
1674
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
+
1675
1687
// / Load formatters that are formatting types from more than one STL
1676
1688
static void LoadCommonStlFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
1677
1689
if (!cpp_category_sp)
@@ -1749,6 +1761,10 @@ static void LoadCommonStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1749
1761
AddCXXSynthetic (cpp_category_sp, GenericOptionalSyntheticFrontEndCreator,
1750
1762
" std::optional synthetic children" ,
1751
1763
" ^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 );
1752
1768
1753
1769
AddCXXSummary (cpp_category_sp, GenericSmartPointerSummaryProvider,
1754
1770
" MSVC STL/libstdc++ std::shared_ptr summary provider" ,
@@ -1786,6 +1802,10 @@ static void LoadCommonStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1786
1802
" MSVC STL/libstdc++ std unordered container summary provider" ,
1787
1803
" ^std::unordered_(multi)?(map|set)<.+> ?>$" , stl_summary_flags,
1788
1804
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 );
1789
1809
}
1790
1810
1791
1811
static void LoadMsvcStlFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
@@ -1834,6 +1854,14 @@ static void LoadMsvcStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
1834
1854
AddCXXSummary (cpp_category_sp, MsvcStlAtomicSummaryProvider,
1835
1855
" MSVC STL std::atomic summary provider" , " ^std::atomic<.+>$" ,
1836
1856
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 );
1837
1865
}
1838
1866
1839
1867
static void LoadSystemFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
0 commit comments