Add/improve visualizations for liballoc types
diff --git a/src/etc/natvis/liballoc.natvis b/src/etc/natvis/liballoc.natvis
index 9cc60fc..7076431 100644
--- a/src/etc/natvis/liballoc.natvis
+++ b/src/etc/natvis/liballoc.natvis
@@ -57,16 +57,26 @@
</Synthetic>
</Expand>
</Type>
+
<Type Name="alloc::rc::Rc<*>">
<DisplayString>{ptr.pointer->value}</DisplayString>
<Expand>
<ExpandedItem>ptr.pointer->value</ExpandedItem>
+ <Item Name="[Reference count]">ptr.pointer->strong</Item>
+ </Expand>
+ </Type>
+ <Type Name="alloc::rc::Weak<*>">
+ <DisplayString>{ptr.pointer->value}</DisplayString>
+ <Expand>
+ <ExpandedItem>ptr.pointer->value</ExpandedItem>
</Expand>
</Type>
+
<Type Name="alloc::sync::Arc<*>">
<DisplayString>{ptr.pointer->data}</DisplayString>
<Expand>
<ExpandedItem>ptr.pointer->data</ExpandedItem>
+ <Item Name="[Reference count]">ptr.pointer->strong</Item>
</Expand>
</Type>
<Type Name="alloc::sync::Weak<*>">
diff --git a/src/test/debuginfo/pretty-std.rs b/src/test/debuginfo/pretty-std.rs
index 7ed76be..a2074c4 100644
--- a/src/test/debuginfo/pretty-std.rs
+++ b/src/test/debuginfo/pretty-std.rs
@@ -129,9 +129,23 @@
// NOTE: cdb fails to interpret debug info of Option enums on i686.
// cdb-check:some_string [Type: enum$<core::option::Option<alloc::string::String>, 1, [...], Some>]
-#![allow(unused_variables)]
-use std::ffi::OsString;
+// cdb-command: dx linkedlist
+// cdb-check:linkedlist : { len=0x2 } [Type: alloc::collections::linked_list::LinkedList<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::collections::linked_list::LinkedList<i32>]
+// cdb-check: [0x0] : 128 [Type: int]
+// cdb-check: [0x1] : 42 [Type: int]
+// cdb-command: dx vecdeque
+// cdb-check:vecdeque : { len=0x2 } [Type: alloc::collections::vec_deque::VecDeque<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::collections::vec_deque::VecDeque<i32>]
+// cdb-check: [len] : 0x2
+// cdb-check: [capacity] : 0x8 [Type: unsigned __int64]
+// cdb-check: [0x0] : 90 [Type: int]
+// cdb-check: [0x1] : 20 [Type: int]
+
+#![allow(unused_variables)]
+use std::collections::{LinkedList, VecDeque};
+use std::ffi::OsString;
fn main() {
@@ -156,6 +170,16 @@ fn main() {
let some_string = Some("IAMA optional string!".to_owned());
+ // LinkedList
+ let mut linkedlist = LinkedList::new();
+ linkedlist.push_back(42);
+ linkedlist.push_front(128);
+
+ // VecDeque
+ let mut vecdeque = VecDeque::new();
+ vecdeque.push_back(20);
+ vecdeque.push_front(90);
+
zzz(); // #break
}
diff --git a/src/test/debuginfo/rc_arc.rs b/src/test/debuginfo/rc_arc.rs
index 6e558bd..24623bc 100644
--- a/src/test/debuginfo/rc_arc.rs
+++ b/src/test/debuginfo/rc_arc.rs
@@ -29,22 +29,31 @@
// cdb-command:dx r,d
// cdb-check:r,d : 42 [Type: alloc::rc::Rc<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::rc::Rc<i32>]
+// cdb-check: [Reference count] : 2 [Type: core::cell::Cell<usize>]
// cdb-command:dx r1,d
// cdb-check:r1,d : 42 [Type: alloc::rc::Rc<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::rc::Rc<i32>]
+// cdb-check: [Reference count] : 2 [Type: core::cell::Cell<usize>]
// cdb-command:dx w1,d
-// cdb-check:w1,d [Type: alloc::rc::Weak<i32>]
-// cdb-check: [...] ptr : [...] [Type: core::ptr::non_null::NonNull<alloc::rc::RcBox<i32> >]
+// cdb-check:w1,d : 42 [Type: alloc::rc::Weak<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::rc::Weak<i32>]
// cdb-command:dx a,d
// cdb-check:a,d : 42 [Type: alloc::sync::Arc<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::sync::Arc<i32>]
+// cdb-check: [Reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
// cdb-command:dx a1,d
// cdb-check:a1,d : 42 [Type: alloc::sync::Arc<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::sync::Arc<i32>]
+// cdb-check: [Reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
// cdb-command:dx w2,d
// cdb-check:w2,d : 42 [Type: alloc::sync::Weak<i32>]
+// cdb-check: [<Raw View>] [Type: alloc::sync::Weak<i32>]
use std::rc::Rc;
use std::sync::Arc;