mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
28 lines
686 B
Python
28 lines
686 B
Python
import lldb
|
|
|
|
|
|
class RigidArraySynthetic:
|
|
valobj: lldb.SBValue
|
|
storage: lldb.SBValue
|
|
count: int
|
|
|
|
def __init__(self, valobj: lldb.SBValue, _) -> None:
|
|
self.valobj = valobj
|
|
|
|
def num_children(self) -> int:
|
|
return self.count
|
|
|
|
def get_child_at_index(self, idx: int) -> lldb.SBValue:
|
|
return self.storage.GetChildAtIndex(idx)
|
|
|
|
def update(self) -> bool:
|
|
self.storage = self.valobj.GetChildMemberWithName(
|
|
"_storage"
|
|
).GetSyntheticValue()
|
|
self.count = (
|
|
self.valobj.GetChildMemberWithName("_count")
|
|
.GetSyntheticValue()
|
|
.GetValueAsUnsigned()
|
|
)
|
|
return True
|