-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsegment_array.natvis
More file actions
81 lines (81 loc) · 4.41 KB
/
Copy pathsegment_array.natvis
File metadata and controls
81 lines (81 loc) · 4.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="segment_array_implement<*>">
<DisplayString>{{ size={root_.size} }}</DisplayString>
<Expand>
<Item Name="[allocator]" ExcludeView="simple">(node_allocator_t &)root_</Item>
<Item Name="[raw]">root_</Item>
<CustomListItems Condition="root_.size != 0" Size="root_.size">
<Variable InitialValue="(leaf_node_t *)root_.left" Name="leaf"/>
<Variable InitialValue="0" Name="where"/>
<Variable InitialValue="0" Name="index"/>
<Variable InitialValue="0" Name="inner_index"/>
<Variable InitialValue="(((leaf_node_t *)root_.left)->parent == (node_t *)&root_) ? root_.size : ((inner_node_t *)((leaf_node_t *)root_.left)->parent)->children[0].size" Name="leaf_size"/>
<Loop>
<If Condition="index >= root_.size">
<Break/>
</If>
<If Condition="where >= leaf_size">
<If Condition="leaf->next->parent == leaf->parent">
<Exec>++inner_index</Exec>
</If>
<Else>
<Exec>inner_index = 0</Exec>
</Else>
<Exec>leaf = (leaf_node_t *)leaf->next</Exec>
<If Condition="leaf->parent == (node_t *)leaf">
<Break/>
</If>
<Exec>where = 0</Exec>
<Exec>leaf_size = (leaf->parent == (node_t *)&root_) ? root_.size : ((inner_node_t *)leaf->parent)->children[inner_index].size</Exec>
</If>
<Item Name="[{index}]">leaf->item[where]</Item>
<Exec>++where</Exec>
<Exec>++index</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
<Type Name="segment_array_implement<*>::iterator">
<AlternativeType Name="segment_array_implement<*>::const_iterator" />
<AlternativeType Name="segment_array_implement<*>::reverse_iterator" />
<AlternativeType Name="segment_array_implement<*>::const_reverse_iterator" />
<DisplayString Condition="node->parent != node">{((leaf_node_t *)node)->item[where]}</DisplayString>
<DisplayString Condition="node->parent == node">end</DisplayString>
<Expand>
<Item Condition="node->parent != node" Name="[ptr]">((leaf_node_t *)node)->item[where]</Item>
<Item Condition="node->parent != node" Name="[leaf_bound_]">leaf_bound_</Item>
<Item Condition="node->parent != node" Name="[inner_index_]">inner_index_</Item>
</Expand>
</Type>
<Type Name="segment_array_implement<*>::node_t">
<DisplayString Condition="parent == this">{{ root:size={((root_node_t *)this)->size} }}</DisplayString>
<DisplayString Condition="level != 0 && parent != this">{{ inner:level={level} }}</DisplayString>
<DisplayString Condition="level == 0 && parent != this">{{ leaf:level=0 }}</DisplayString>
<Expand>
<Item Name="[size]" Condition="parent == this">((root_node_t *)this)->size</Item>
<Item Name="[left]" Condition="parent == this">((root_node_t *)this)->left</Item>
<Item Name="[right]" Condition="parent == this">((root_node_t *)this)->right</Item>
<Item Name="[root_tree]" Condition="parent == this">parent</Item>
<Item Name="[level]" Condition="level != 0 && parent != this">level</Item>
<CustomListItems Condition="level != 0 && parent != this">
<Variable InitialValue="0" Name="i"/>
<Variable InitialValue="sizeof(((inner_node_t *)this)->children) / sizeof(((inner_node_t *)this)->children[0])" Name="cap"/>
<Loop>
<If Condition="i >= cap">
<Break/>
</If>
<If Condition="((inner_node_t *)this)->children[i].ptr == 0">
<Break/>
</If>
<Item Name="[child {i}]">((inner_node_t *)this)->children[i].ptr</Item>
<Item Name="[child_size {i}]">((inner_node_t *)this)->children[i].size</Item>
<Exec>++i</Exec>
</Loop>
</CustomListItems>
<Item Name="[level]" Condition="level == 0 && parent != this">0</Item>
<Item Name="[prev]" Condition="level == 0 && parent != this">((leaf_node_t *)this)->prev</Item>
<Item Name="[next]" Condition="level == 0 && parent != this">((leaf_node_t *)this)->next</Item>
</Expand>
</Type>
</AutoVisualizer>