diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index 53face7dbcc..fae1fd0cac3 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -308,13 +308,13 @@ class RustStdBTreeSetPrinter(object): @staticmethod def display_hint(): - return "map" + return "array" def to_string(self): (length, data_ptr) = \ rustpp.extract_length_and_ptr_from_std_btreeset(self.__val) return (self.__val.type.get_unqualified_type_name() + - (" with %i elements" % length)) + ("(len: %i)" % length)) def children(self): (length, data_ptr) = \ @@ -322,7 +322,6 @@ class RustStdBTreeSetPrinter(object): val = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3) gdb_ptr = val.get_wrapped_value() for index in xrange(length): - yield (str(index), str(index)) yield (str(index), gdb_ptr[index]) diff --git a/src/test/debuginfo/pretty-std-collections.rs b/src/test/debuginfo/pretty-std-collections.rs index ca01b823b44..18d73bf5677 100644 --- a/src/test/debuginfo/pretty-std-collections.rs +++ b/src/test/debuginfo/pretty-std-collections.rs @@ -20,7 +20,7 @@ // gdb-command: run // gdb-command: print btree_set -// gdb-check:$1 = BTreeSet with 3 elements = {[0] = 3, [1] = 5, [2] = 7} +// gdb-check:$1 = BTreeSet(len: 3) = {3, 5, 7} // gdb-command: print vec_deque // gdb-check:$2 = VecDeque(len: 3, cap: 8) = {5, 3, 7}