summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectDynamicValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/ValueObjectDynamicValue.cpp')
-rw-r--r--lldb/source/Core/ValueObjectDynamicValue.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp
index 3de12e5a66f..cec2ca52384 100644
--- a/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -113,13 +113,16 @@ ValueObjectDynamicValue::GetDisplayTypeName()
}
size_t
-ValueObjectDynamicValue::CalculateNumChildren()
+ValueObjectDynamicValue::CalculateNumChildren(uint32_t max)
{
const bool success = UpdateValueIfNeeded(false);
if (success && m_dynamic_type_info.HasType())
- return GetCompilerType().GetNumChildren (true);
+ {
+ auto children_count = GetCompilerType().GetNumChildren (true);
+ return children_count <= max ? children_count : max;
+ }
else
- return m_parent->GetNumChildren();
+ return m_parent->GetNumChildren(max);
}
uint64_t
OpenPOWER on IntegriCloud