================ @@ -173,21 +173,21 @@ TryCreateAutoSummaryForContainer(lldb::SBValue &v) { lldb::SBValue child = v.GetChildAtIndex(i); if (llvm::StringRef name = child.GetName(); !name.empty()) { - llvm::StringRef value; + llvm::StringRef desc; if (llvm::StringRef summary = child.GetSummary(); !summary.empty()) - value = summary; + desc = summary; + else if (llvm::StringRef value = child.GetValue(); !value.empty()) + desc = value; else - value = child.GetValue(); - - if (!value.empty()) { - // If the child is an indexed entry, we don't show its index to save - // characters. - if (name.starts_with("[")) - os << separator << value; - else - os << separator << name << ":" << value; - separator = ", "; - } + desc = "{...}"; // Fallback for nested types. ---------------- clayborg wrote:
"{...}" should only be used for structs unions or classes. We are processing the children of an item. You will need to check the type class so I would recommend: ``` static bool IsClassStructOrUnionType(lldb::SBType t) { return (t.GetTypeClass() & (lldb::eTypeClassUnion | lldb::eTypeClassStruct | lldb::eTypeClassUnion)) != 0 } ``` Then in the above code: ``` if (IsClassStructOrUnionType(child.GetType()) desc = "{...}" ``` It seems we would want this description for a top level class/struct/union as well https://github.com/llvm/llvm-project/pull/77026 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits