INNER CODE UNIT · Python
get_child_at_index
SpartanJ/eepp · projects/scripts/debug/eepp_lldb.py:95
def get_child_at_index(self, index):
if index < 0 or index >= self.size:
return None
item_addr = self.data_addr + index * self.type_t.GetByteSize()
return self.valobj.CreateValueFromAddress(f"[{index}]", item_addr, self.type_t)
def has_children(self):
return self.size > 0
def EESmallVectorSummaryProvider(valobj, internal_dict):
"""
Standalone summary provider. It's an LLDB anti-pattern to initialize the
SyntheticProvider class inside here, so we duplicate the tiny bit of logic
needed to read the state efficiently.
"""
# Find m_data, handling base classes
m_data = valobj.GetChildMemberWithName("m_data")