[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 12 12:52:02 PST 2024
================
@@ -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.
----------------
ashgti wrote:
Updated this to use the `{...}` for nested types.
https://github.com/llvm/llvm-project/pull/77026
More information about the lldb-commits
mailing list