Fix GDB pretty-printer for tuples
Names of children should not be the same, because GDB uses them to distinguish the children.
This commit is contained in:
parent
5d2512ec5b
commit
ac33d2cbfb
1 changed files with 2 additions and 2 deletions
|
@ -186,10 +186,10 @@ class RustStructPrinter(object):
|
|||
cs = []
|
||||
wrapped_value = self.__val.get_wrapped_value()
|
||||
|
||||
for field in self.__val.type.get_fields():
|
||||
for number, field in enumerate(self.__val.type.get_fields()):
|
||||
field_value = wrapped_value[field.name]
|
||||
if self.__is_tuple_like:
|
||||
cs.append(("", field_value))
|
||||
cs.append((str(number), field_value))
|
||||
else:
|
||||
cs.append((field.name, field_value))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue