================ @@ -1642,19 +1662,34 @@ static void LoadCommonStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) { }, "MSVC STL/libstdc++ std::wstring summary provider")); + stl_summary_flags.SetDontShowChildren(false); + stl_summary_flags.SetSkipPointers(false); + AddCXXSynthetic(cpp_category_sp, GenericSmartPointerSyntheticFrontEndCreator, "std::shared_ptr synthetic children", "^std::shared_ptr<.+>(( )?&)?$", stl_synth_flags, true); AddCXXSynthetic(cpp_category_sp, GenericSmartPointerSyntheticFrontEndCreator, "std::weak_ptr synthetic children", "^std::weak_ptr<.+>(( )?&)?$", stl_synth_flags, true); + AddCXXSynthetic(cpp_category_sp, GenericListSyntheticFrontEndCreator, + "std::list synthetic children", "^std::list<.+>(( )?&)?$", + stl_synth_flags, true); + AddCXXSynthetic(cpp_category_sp, GenericForwardListSyntheticFrontEndCreator, + "std::forward_list synthetic children", + "^std::forward_list<.+>(( )?&)?$", stl_synth_flags, true); AddCXXSummary(cpp_category_sp, GenericSmartPointerSummaryProvider, "MSVC STL/libstdc++ std::shared_ptr summary provider", "^std::shared_ptr<.+>(( )?&)?$", stl_summary_flags, true); AddCXXSummary(cpp_category_sp, GenericSmartPointerSummaryProvider, "MSVC STL/libstdc++ std::weak_ptr summary provider", "^std::weak_ptr<.+>(( )?&)?$", stl_summary_flags, true); + AddCXXSummary(cpp_category_sp, ContainerSizeSummaryProvider, + "MSVC STL/libstdc++ std::list summary provider", + "^std::list<.+>(( )?&)?$", stl_summary_flags, true); + AddCXXSummary(cpp_category_sp, ContainerSizeSummaryProvider, + "MSVC STL/libstdc++ std::forward_list summary provider", + "^std::forward_list<.+>(( )?&)?$", stl_summary_flags, true); ---------------- Nerixyz wrote:
I don't think this will help or provide useful information. In https://github.com/llvm/llvm-project/commit/318800a6a9fc054ad18d33b3ae947328cdf6f08c, I added this to both `forward_list` and `list`. Most importantly, we don't know that the list contains more elements when it's capped. Consider the following: ``` (lldb) b main.cpp:21 Breakpoint 1: where = main.exe`main + 265 at main.cpp:21:1, address = 0x0000000140001129 (lldb) r Process 19688 launched: ... (lldb) settings set target.max-children-count 4 (lldb) fr v thousand_elts (std::forward_list<int>) thousand_elts = size=4 { [0] = 999 [1] = 998 [2] = 997 [3] = 996 } (lldb) settings set target.max-children-count 3 (lldb) fr v thousand_elts (std::forward_list<int>) thousand_elts = (capped) size=4 { [0] = 999 [1] = 998 [2] = 997 ... } *** Some of the displayed variables have more members than the debugger will show by default. To show all of them, you can either use the --show-all-children option to frame variable or raise the limit by changing the target.max-children-count setting. ``` When we first inspect the list, we traverse the list for at most four elements. The synthetic children know that they're not done, but the summary doesn't know that. Now when the max children are lowered, we don't update the synthetic children, so they still know of four elements. Then, the summary knows that there are at least four elements, so it displays "(capped)". This was the behavior with the libstdc++ summary as well (I only ported it to C++). I think it's a bit misleading as LLDB will also show that there are more children as you can see above. https://github.com/llvm/llvm-project/pull/148285 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits