Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/etc/lldb_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ def get_child_index(self, name: str) -> int:

def get_child_at_index(self, index: int) -> SBValue:
child: SBValue = self.valobj.GetChildAtIndex(index)
return child.CreateChildAtOffset(str(index), 0, child.GetType())
offset = self.valobj.GetType().GetFieldAtIndex(index).byte_offset
return self.valobj.CreateChildAtOffset(str(index), offset, child.GetType())

def update(self):
pass
Expand All @@ -772,7 +773,7 @@ def has_children(self) -> bool:
def get_type_name(self) -> str:
name = self.valobj.GetTypeName()
# remove "tuple$<" and ">", str.removeprefix and str.removesuffix require python 3.9+
name = name[7:-1]
name = name[7:-1].strip()
return "(" + name + ")"


Expand Down
Loading