diff options
| author | Walnut <39544927+Walnut356@users.noreply.github.com> | 2025-09-30 03:04:23 -0500 |
|---|---|---|
| committer | Walnut <39544927+Walnut356@users.noreply.github.com> | 2025-09-30 03:04:23 -0500 |
| commit | 1f8bef51e30a087a8b8843c19762952a50087a71 (patch) | |
| tree | 29c3292a2d92c3e139556c95255be85a3e882338 /src | |
| parent | f957826bff7a68b267ce75b1ea56352aed0cca0a (diff) | |
| download | rust-1f8bef51e30a087a8b8843c19762952a50087a71.tar.gz rust-1f8bef51e30a087a8b8843c19762952a50087a71.zip | |
fix tuple child creation
Diffstat (limited to 'src')
| -rw-r--r-- | src/etc/lldb_providers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index 65f18baa937..3eb964d2fba 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -761,7 +761,8 @@ class MSVCTupleSyntheticProvider: 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 @@ -772,7 +773,7 @@ class MSVCTupleSyntheticProvider: 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 + ")" |
