]> git.proxmox.com Git - rustc.git/blame - src/etc/natvis/liballoc.natvis
New upstream version 1.55.0+dfsg1
[rustc.git] / src / etc / natvis / liballoc.natvis
CommitLineData
8bb4bdeb
XL
1<?xml version="1.0" encoding="utf-8"?>
2<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
041b39d2 3 <Type Name="alloc::vec::Vec&lt;*&gt;">
5869c6ff 4 <DisplayString>{{ len={len} }}</DisplayString>
cc61c64b 5 <Expand>
5869c6ff 6 <Item Name="[len]" ExcludeView="simple">len</Item>
8bb4bdeb
XL
7 <Item Name="[capacity]" ExcludeView="simple">buf.cap</Item>
8 <ArrayItems>
9 <Size>len</Size>
48663c56 10 <ValuePointer>buf.ptr.pointer</ValuePointer>
8bb4bdeb 11 </ArrayItems>
cc61c64b
XL
12 </Expand>
13 </Type>
48663c56 14 <Type Name="alloc::collections::vec_deque::VecDeque&lt;*&gt;">
5869c6ff 15 <DisplayString>{{ len={tail &lt;= head ? head - tail : buf.cap - tail + head} }}</DisplayString>
8bb4bdeb 16 <Expand>
5869c6ff 17 <Item Name="[len]" ExcludeView="simple">tail &lt;= head ? head - tail : buf.cap - tail + head</Item>
8bb4bdeb
XL
18 <Item Name="[capacity]" ExcludeView="simple">buf.cap</Item>
19 <CustomListItems>
20 <Variable Name="i" InitialValue="tail" />
21
22 <Size>tail &lt;= head ? head - tail : buf.cap - tail + head</Size>
23 <Loop>
24 <If Condition="i == head">
25 <Break/>
26 </If>
48663c56 27 <Item>buf.ptr.pointer[i]</Item>
8bb4bdeb
XL
28 <Exec>i = (i + 1 == buf.cap ? 0 : i + 1)</Exec>
29 </Loop>
30 </CustomListItems>
31 </Expand>
32 </Type>
48663c56 33 <Type Name="alloc::collections::linked_list::LinkedList&lt;*&gt;">
5869c6ff 34 <DisplayString>{{ len={len} }}</DisplayString>
8bb4bdeb
XL
35 <Expand>
36 <LinkedListItems>
37 <Size>len</Size>
48663c56
XL
38 <HeadPointer>*(alloc::collections::linked_list::Node&lt;$T1&gt; **)&amp;head</HeadPointer>
39 <NextPointer>*(alloc::collections::linked_list::Node&lt;$T1&gt; **)&amp;next</NextPointer>
8bb4bdeb
XL
40 <ValueNode>element</ValueNode>
41 </LinkedListItems>
42 </Expand>
43 </Type>
041b39d2 44 <Type Name="alloc::string::String">
5869c6ff
XL
45 <DisplayString>{(char*)vec.buf.ptr.pointer,[vec.len]s8}</DisplayString>
46 <StringView>(char*)vec.buf.ptr.pointer,[vec.len]s8</StringView>
8bb4bdeb 47 <Expand>
5869c6ff 48 <Item Name="[len]" ExcludeView="simple">vec.len</Item>
8bb4bdeb 49 <Item Name="[capacity]" ExcludeView="simple">vec.buf.cap</Item>
5869c6ff 50 <Synthetic Name="[chars]">
136023e0 51 <DisplayString>{(char*)vec.buf.ptr.pointer,[vec.len]s8}</DisplayString>
5869c6ff
XL
52 <Expand>
53 <ArrayItems>
54 <Size>vec.len</Size>
55 <ValuePointer>(char*)vec.buf.ptr.pointer</ValuePointer>
56 </ArrayItems>
57 </Expand>
58 </Synthetic>
59 </Expand>
60 </Type>
136023e0 61
5869c6ff
XL
62 <Type Name="alloc::rc::Rc&lt;*&gt;">
63 <DisplayString>{ptr.pointer->value}</DisplayString>
64 <Expand>
65 <ExpandedItem>ptr.pointer->value</ExpandedItem>
136023e0
XL
66 <Item Name="[Reference count]">ptr.pointer->strong</Item>
67 <Item Name="[Weak reference count]">ptr.pointer->weak</Item>
5869c6ff
XL
68 </Expand>
69 </Type>
136023e0
XL
70 <Type Name="alloc::rc::Weak&lt;*&gt;">
71 <DisplayString>{ptr.pointer->value}</DisplayString>
72 <Expand>
73 <ExpandedItem>ptr.pointer->value</ExpandedItem>
74 <Item Name="[Reference count]">ptr.pointer->strong</Item>
75 <Item Name="[Weak reference count]">ptr.pointer->weak</Item>
76 </Expand>
77 </Type>
78
5869c6ff
XL
79 <Type Name="alloc::sync::Arc&lt;*&gt;">
80 <DisplayString>{ptr.pointer->data}</DisplayString>
81 <Expand>
82 <ExpandedItem>ptr.pointer->data</ExpandedItem>
136023e0
XL
83 <Item Name="[Reference count]">ptr.pointer->strong</Item>
84 <Item Name="[Weak reference count]">ptr.pointer->weak</Item>
5869c6ff
XL
85 </Expand>
86 </Type>
87 <Type Name="alloc::sync::Weak&lt;*&gt;">
88 <DisplayString>{ptr.pointer->data}</DisplayString>
89 <Expand>
90 <ExpandedItem>ptr.pointer->data</ExpandedItem>
136023e0
XL
91 <Item Name="[Reference count]">ptr.pointer->strong</Item>
92 <Item Name="[Weak reference count]">ptr.pointer->weak</Item>
8bb4bdeb
XL
93 </Expand>
94 </Type>
6a06907d
XL
95 <Type Name="alloc::borrow::Cow&lt;*&gt;">
96 <DisplayString Condition="RUST$ENUM$DISR == 0x0">Borrowed({__0})</DisplayString>
97 <DisplayString Condition="RUST$ENUM$DISR == 0x1">Owned({__0})</DisplayString>
98 <Expand>
99 <Item Name="[value]" ExcludeView="simple">__0</Item>
100 </Expand>
101 </Type>
041b39d2 102</AutoVisualizer>