diff options
| author | gentoo90 <gentoo90@gmail.com> | 2017-05-28 12:08:40 +0300 |
|---|---|---|
| committer | gentoo90 <gentoo90@gmail.com> | 2017-05-28 12:08:40 +0300 |
| commit | ac33d2cbfbe103cb9dda7cc31eda85fcd8ca039d (patch) | |
| tree | 05e6aa2bc218b5e9c70bfbc14a5cad9e0b90dcac | |
| parent | 5d2512ec5b03a1155054df881e40e35fc87d6351 (diff) | |
| download | rust-ac33d2cbfbe103cb9dda7cc31eda85fcd8ca039d.tar.gz rust-ac33d2cbfbe103cb9dda7cc31eda85fcd8ca039d.zip | |
Fix GDB pretty-printer for tuples
Names of children should not be the same, because GDB uses them to distinguish the children.
| -rwxr-xr-x | src/etc/gdb_rust_pretty_printing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index afac8d6bbae..e617435f54f 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -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)) |
