From: bors Date: Sun, 22 Mar 2020 08:55:18 +0000 (+0000) Subject: Auto merge of #68098 - ssomers:btreemap_gdb_pretty_print, r=Mark-Simulacrum X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=94d43d656665e59abc10c7c22a3194685e7cc605;p=rust.git Auto merge of #68098 - ssomers:btreemap_gdb_pretty_print, r=Mark-Simulacrum Test gdb pretty printing more and fix overzealous type substitution Adresses a problem concerning printing BTreeMap / BTreeSet data in gdb: when the key or value type name contains substring "LeafNode", and the map has multiple nodes (e.g. more than 11 elements), printing causes an exception. E.g. ``` rustc -g - < = (0..12).map(|i| (i, MyLeafNode(i))).collect(); assert!(!m.is_empty()); } EOF ``` ``` $ rust-gdb rust_out (gdb) b 7 (gdb) r (gdb) p m $1 = BTreeMap(len: 12)Python Exception No type named alloc::collections::btree::node::InternalNode.: use std::collections::BTreeMap; ``` The code was written in #56144 by @tromey (and later touched upon by @RalfJung in #57045, but I think that had nothing to do with the issues in this PR). --- 94d43d656665e59abc10c7c22a3194685e7cc605