@@ -756,6 +756,11 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
756
756
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator,
757
757
" libc++ std::vector synthetic children" ,
758
758
" ^std::__[[:alnum:]]+::vector<.+>(( )?&)?$" , stl_deref_flags, true );
759
+ AddCXXSynthetic (
760
+ cpp_category_sp,
761
+ lldb_private::formatters::LibcxxStdValarraySyntheticFrontEndCreator,
762
+ " libc++ std::valarray synthetic children" ,
763
+ " ^std::__[[:alnum:]]+::valarray<.+>$" , stl_deref_flags, true );
759
764
AddCXXSynthetic (
760
765
cpp_category_sp,
761
766
lldb_private::formatters::LibcxxStdForwardListSyntheticFrontEndCreator,
@@ -887,6 +892,10 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
887
892
" libc++ std::list summary provider" ,
888
893
" ^std::__[[:alnum:]]+::forward_list<.+>(( )?&)?$" ,
889
894
stl_summary_flags, true );
895
+ AddCXXSummary (cpp_category_sp,
896
+ lldb_private::formatters::LibcxxContainerSummaryProvider,
897
+ " libc++ std::valarray summary provider" ,
898
+ " ^std::__[[:alnum:]]+::valarray<.+>$" , stl_summary_flags, true );
890
899
AddCXXSummary (
891
900
cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider,
892
901
" libc++ std::list summary provider" ,
@@ -986,6 +995,174 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
986
995
" std::unordered_map iterator synthetic children" ,
987
996
" ^std::__[[:alnum:]]+::__hash_map_(const_)?iterator<.+>$" ,
988
997
stl_synth_flags, true );
998
+ // Chrono duration typedefs
999
+ cpp_category_sp->AddTypeSummary (
1000
+ " ^std::__[[:alnum:]]+::chrono::nanoseconds" , eFormatterMatchRegex,
1001
+ TypeSummaryImplSP (new StringSummaryFormat (
1002
+ eTypeOptionHideChildren | eTypeOptionHideValue, " ${var.__rep_} ns" )));
1003
+ cpp_category_sp->AddTypeSummary (
1004
+ " ^std::__[[:alnum:]]+::chrono::microseconds" , eFormatterMatchRegex,
1005
+ TypeSummaryImplSP (new StringSummaryFormat (
1006
+ eTypeOptionHideChildren | eTypeOptionHideValue, " ${var.__rep_} µs" )));
1007
+ cpp_category_sp->AddTypeSummary (
1008
+ " ^std::__[[:alnum:]]+::chrono::milliseconds" , eFormatterMatchRegex,
1009
+ TypeSummaryImplSP (new StringSummaryFormat (
1010
+ eTypeOptionHideChildren | eTypeOptionHideValue, " ${var.__rep_} ms" )));
1011
+ cpp_category_sp->AddTypeSummary (
1012
+ " ^std::__[[:alnum:]]+::chrono::seconds" , eFormatterMatchRegex,
1013
+ TypeSummaryImplSP (new StringSummaryFormat (
1014
+ eTypeOptionHideChildren | eTypeOptionHideValue, " ${var.__rep_} s" )));
1015
+ cpp_category_sp->AddTypeSummary (
1016
+ " ^std::__[[:alnum:]]+::chrono::minutes" , eFormatterMatchRegex,
1017
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1018
+ eTypeOptionHideValue,
1019
+ " ${var.__rep_} min" )));
1020
+ cpp_category_sp->AddTypeSummary (
1021
+ " ^std::__[[:alnum:]]+::chrono::hours" , eFormatterMatchRegex,
1022
+ TypeSummaryImplSP (new StringSummaryFormat (
1023
+ eTypeOptionHideChildren | eTypeOptionHideValue, " ${var.__rep_} h" )));
1024
+
1025
+ cpp_category_sp->AddTypeSummary (
1026
+ " ^std::__[[:alnum:]]+::chrono::days" , eFormatterMatchRegex,
1027
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1028
+ eTypeOptionHideValue,
1029
+ " ${var.__rep_} days" )));
1030
+ cpp_category_sp->AddTypeSummary (
1031
+ " ^std::__[[:alnum:]]+::chrono::weeks" , eFormatterMatchRegex,
1032
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1033
+ eTypeOptionHideValue,
1034
+ " ${var.__rep_} weeks" )));
1035
+ cpp_category_sp->AddTypeSummary (
1036
+ " ^std::__[[:alnum:]]+::chrono::months" , eFormatterMatchRegex,
1037
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1038
+ eTypeOptionHideValue,
1039
+ " ${var.__rep_} months" )));
1040
+ cpp_category_sp->AddTypeSummary (
1041
+ " ^std::__[[:alnum:]]+::chrono::years" , eFormatterMatchRegex,
1042
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1043
+ eTypeOptionHideValue,
1044
+ " ${var.__rep_} years" )));
1045
+ cpp_category_sp->AddTypeSummary (
1046
+ " ^std::__[[:alnum:]]+::chrono::seconds" , eFormatterMatchRegex,
1047
+ TypeSummaryImplSP (new StringSummaryFormat (
1048
+ eTypeOptionHideChildren | eTypeOptionHideValue, " ${var.__rep_} s" )));
1049
+
1050
+ // Chrono time point types
1051
+
1052
+ AddCXXSummary (cpp_category_sp,
1053
+ lldb_private::formatters::LibcxxChronoSysSecondsSummaryProvider,
1054
+ " libc++ std::chrono::sys_seconds summary provider" ,
1055
+ " ^std::__[[:alnum:]]+::chrono::time_point<"
1056
+ " std::__[[:alnum:]]+::chrono::system_clock, "
1057
+ " std::__[[:alnum:]]+::chrono::duration<long long, "
1058
+ " std::__[[:alnum:]]+::ratio<1, 1> "
1059
+ " > >$" ,
1060
+ eTypeOptionHideChildren | eTypeOptionHideValue |
1061
+ eTypeOptionCascade,
1062
+ true );
1063
+ AddCXXSummary (cpp_category_sp,
1064
+ lldb_private::formatters::LibcxxChronoSysDaysSummaryProvider,
1065
+ " libc++ std::chrono::sys_seconds summary provider" ,
1066
+ " ^std::__[[:alnum:]]+::chrono::time_point<"
1067
+ " std::__[[:alnum:]]+::chrono::system_clock, "
1068
+ " std::__[[:alnum:]]+::chrono::duration<int, "
1069
+ " std::__[[:alnum:]]+::ratio<86400, 1> "
1070
+ " > >$" ,
1071
+ eTypeOptionHideChildren | eTypeOptionHideValue |
1072
+ eTypeOptionCascade,
1073
+ true );
1074
+
1075
+ // Chrono calendar types
1076
+
1077
+ cpp_category_sp->AddTypeSummary (
1078
+ " ^std::__[[:alnum:]]+::chrono::day$" , eFormatterMatchRegex,
1079
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1080
+ eTypeOptionHideValue,
1081
+ " day=${var.__d_%u}" )));
1082
+
1083
+ AddCXXSummary (cpp_category_sp,
1084
+ lldb_private::formatters::LibcxxChronoMonthSummaryProvider,
1085
+ " libc++ std::chrono::month summary provider" ,
1086
+ " ^std::__[[:alnum:]]+::chrono::month$" ,
1087
+ eTypeOptionHideChildren | eTypeOptionHideValue, true );
1088
+
1089
+ cpp_category_sp->AddTypeSummary (
1090
+ " ^std::__[[:alnum:]]+::chrono::year$" , eFormatterMatchRegex,
1091
+ TypeSummaryImplSP (new StringSummaryFormat (
1092
+ eTypeOptionHideChildren | eTypeOptionHideValue, " year=${var.__y_}" )));
1093
+
1094
+ AddCXXSummary (cpp_category_sp,
1095
+ lldb_private::formatters::LibcxxChronoWeekdaySummaryProvider,
1096
+ " libc++ std::chrono::weekday summary provider" ,
1097
+ " ^std::__[[:alnum:]]+::chrono::weekday$" ,
1098
+ eTypeOptionHideChildren | eTypeOptionHideValue, true );
1099
+
1100
+ cpp_category_sp->AddTypeSummary (
1101
+ " ^std::__[[:alnum:]]+::chrono::weekday_indexed$" , eFormatterMatchRegex,
1102
+ TypeSummaryImplSP (new StringSummaryFormat (
1103
+ eTypeOptionHideChildren | eTypeOptionHideValue,
1104
+ " ${var.__wd_} index=${var.__idx_%u}" )));
1105
+
1106
+ cpp_category_sp->AddTypeSummary (
1107
+ " ^std::__[[:alnum:]]+::chrono::weekday_last$" , eFormatterMatchRegex,
1108
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1109
+ eTypeOptionHideValue,
1110
+ " ${var.__wd_} index=last" )));
1111
+ cpp_category_sp->AddTypeSummary (
1112
+ " ^std::__[[:alnum:]]+::chrono::month_day$" , eFormatterMatchRegex,
1113
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1114
+ eTypeOptionHideValue,
1115
+ " ${var.__m_} ${var.__d_}" )));
1116
+ cpp_category_sp->AddTypeSummary (
1117
+ " ^std::__[[:alnum:]]+::chrono::month_day_last$" , eFormatterMatchRegex,
1118
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1119
+ eTypeOptionHideValue,
1120
+ " ${var.__m_} day=last" )));
1121
+
1122
+ cpp_category_sp->AddTypeSummary (
1123
+ " ^std::__[[:alnum:]]+::chrono::month_weekday$" , eFormatterMatchRegex,
1124
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1125
+ eTypeOptionHideValue,
1126
+ " ${var.__m_} ${var.__wdi_}" )));
1127
+
1128
+ cpp_category_sp->AddTypeSummary (
1129
+ " ^std::__[[:alnum:]]+::chrono::month_weekday_last$" , eFormatterMatchRegex,
1130
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1131
+ eTypeOptionHideValue,
1132
+ " ${var.__m_} ${var.__wdl_}" )));
1133
+
1134
+ cpp_category_sp->AddTypeSummary (
1135
+ " ^std::__[[:alnum:]]+::chrono::year_month$" , eFormatterMatchRegex,
1136
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1137
+ eTypeOptionHideValue,
1138
+ " ${var.__y_} ${var.__m_}" )));
1139
+
1140
+ AddCXXSummary (
1141
+ cpp_category_sp,
1142
+ lldb_private::formatters::LibcxxChronoYearMonthDaySummaryProvider,
1143
+ " libc++ std::chrono::year_month_day summary provider" ,
1144
+ " ^std::__[[:alnum:]]+::chrono::year_month_day$" ,
1145
+ eTypeOptionHideChildren | eTypeOptionHideValue, true );
1146
+
1147
+ cpp_category_sp->AddTypeSummary (
1148
+ " ^std::__[[:alnum:]]+::chrono::year_month_day_last$" ,
1149
+ eFormatterMatchRegex,
1150
+ TypeSummaryImplSP (new StringSummaryFormat (eTypeOptionHideChildren |
1151
+ eTypeOptionHideValue,
1152
+ " ${var.__y_} ${var.__mdl_}" )));
1153
+
1154
+ cpp_category_sp->AddTypeSummary (
1155
+ " ^std::__[[:alnum:]]+::chrono::year_month_weekday$" , eFormatterMatchRegex,
1156
+ TypeSummaryImplSP (new StringSummaryFormat (
1157
+ eTypeOptionHideChildren | eTypeOptionHideValue,
1158
+ " ${var.__y_} ${var.__m_} ${var.__wdi_}" )));
1159
+
1160
+ cpp_category_sp->AddTypeSummary (
1161
+ " ^std::__[[:alnum:]]+::chrono::year_month_weekday_last$" ,
1162
+ eFormatterMatchRegex,
1163
+ TypeSummaryImplSP (new StringSummaryFormat (
1164
+ eTypeOptionHideChildren | eTypeOptionHideValue,
1165
+ " ${var.__y_} ${var.__m_} ${var.__wdl_}" )));
989
1166
}
990
1167
991
1168
static void LoadLibStdcppFormatters (lldb::TypeCategoryImplSP cpp_category_sp) {
0 commit comments