-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNatvisFile.natvis
82 lines (70 loc) · 2.59 KB
/
NatvisFile.natvis
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
82
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="_Word">
<DisplayString>Name: {Name,s}</DisplayString>
</Type>
<Type Name="_Object">
<DisplayString Condition="Type.ThisType == NULLObjectType">Type: NULLObject</DisplayString>
<DisplayString Condition="Type.ThisType == IntObjectType">Type: IntObject</DisplayString>
<DisplayString Condition="Type.ThisType == ObjectPtrType">Type: ObjectPtr</DisplayString>
<DisplayString Condition="Type.ThisType == WordRefType">Type: WordRefObject</DisplayString>
<DisplayString Condition="Type.ThisType == CodeAddressType">Type: CodeAddressObject</DisplayString>
<Expand>
<!-- Show type-specific data by casting based on Type -->
<Synthetic Name="[Int]" Condition="Type.ThisType == IntObjectType">
<DisplayString>{i}</DisplayString>
</Synthetic>
<Synthetic Name="[Ptr]" Condition="Type.ThisType == ObjectPtrType">
<DisplayString>{Ptr}</DisplayString>
<Expand>
<Item Name="[Object]">Ptr</Item>
</Expand>
</Synthetic>
<Synthetic Name="[Word]" Condition="Type.ThisType == WordRefType">
<DisplayString>{Word}</DisplayString>
</Synthetic>
<Synthetic Name="[CA]" Condition="Type.ThisType == CodeAddressType">
<DisplayString>{CA}</DisplayString>
</Synthetic>
<!-- Walk Objects that follow this Object's address -->
<CustomListItems MaxItemsPerView="5" IncludeView="array">
<Variable Name="ptr" InitialValue="this" />
<Variable Name="size" InitialValue="0" />
<!--
<Variable Name="end" InitialValue="0" />
-->
<Loop>
<Item>ptr</Item>
<!-- stop AFTER we found the last NULLObject -->
<!--
<Break Condition="end == 1"/>
-->
<!-- Advance ptr by the Object type size -->
<If Condition="ptr->Type.ThisType == NULLObjectType">
<Exec>size = 1</Exec>
</If>
<If Condition="ptr->Type.ThisType == IntObjectType">
<Exec>size = 3</Exec>
</If>
<If Condition="ptr->Type.ThisType == ObjectPtrType">
<Exec>size = 9</Exec>
</If>
<If Condition="ptr->Type.ThisType == WordRefType">
<Exec>size = 9</Exec>
</If>
<If Condition="ptr->Type.ThisType == CodeAddressType">
<Exec>size = 9</Exec>
</If>
<!-- must walk ptr by variable Object size, as bytes -->
<Exec>ptr = (_Object*)((char*)ptr + size)</Exec>
<!-- Is the next one the end? -->
<!--
<If Condition="(ptr->Type & 15) == 0">
<Exec>end = 1</Exec>
</If>
-->
</Loop>
</CustomListItems>
</Expand>
</Type>
</AutoVisualizer>