<rdar://problem/13621080>
This commit changes the ${function.name-with-args} prompt keyword to also tackle structs
Previously, since aggregates have no values, this would show up as foo=(null)
This checkin changes that to instead print foo=(Foo at 0x123) (i.e. typename at address)
There are other potential choices here (summary, one-liner printout of all members, ...) and I would love to hear feedback about better options, if any
llvm-svn: 181462
diff --git a/lldb/source/Symbol/VariableList.cpp b/lldb/source/Symbol/VariableList.cpp
index b34ea3a..3451166 100644
--- a/lldb/source/Symbol/VariableList.cpp
+++ b/lldb/source/Symbol/VariableList.cpp
@@ -134,6 +134,27 @@
return var_list.GetSize() - initial_size;
}
+size_t
+VariableList::AppendVariablesWithScope (lldb::ValueType type,
+ VariableList &var_list,
+ bool if_unique)
+{
+ const size_t initial_size = var_list.GetSize();
+ iterator pos, end = m_variables.end();
+ for (pos = m_variables.begin(); pos != end; ++pos)
+ {
+ if ((*pos)->GetScope() == type)
+ {
+ if (if_unique)
+ var_list.AddVariableIfUnique (*pos);
+ else
+ var_list.AddVariable(*pos);
+ }
+ }
+ // Return the number of new unique variables added to "var_list"
+ return var_list.GetSize() - initial_size;
+}
+
uint32_t
VariableList::FindIndexForVariable (Variable* variable)
{