summaryrefslogtreecommitdiffstats
path: root/src/etc/natvis/intrinsic.natvis
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/natvis/intrinsic.natvis')
-rw-r--r--src/etc/natvis/intrinsic.natvis225
1 files changed, 225 insertions, 0 deletions
diff --git a/src/etc/natvis/intrinsic.natvis b/src/etc/natvis/intrinsic.natvis
new file mode 100644
index 000000000..558536fa6
--- /dev/null
+++ b/src/etc/natvis/intrinsic.natvis
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
+ <Type Name="str">
+ <DisplayString>{(char*)data_ptr,[length]s8}</DisplayString>
+ <StringView>(char*)data_ptr,[length]s8</StringView>
+ <Expand>
+ <Item Name="[len]" ExcludeView="simple">length</Item>
+ <Synthetic Name="[chars]">
+ <Expand>
+ <ArrayItems>
+ <Size>length</Size>
+ <ValuePointer>data_ptr</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Synthetic>
+ </Expand>
+ </Type>
+ <Type Name="slice$&lt;*&gt;">
+ <DisplayString>{{ len={length} }}</DisplayString>
+ <Expand>
+ <Item Name="[len]" ExcludeView="simple">length</Item>
+ <ArrayItems>
+ <Size>length</Size>
+ <ValuePointer>data_ptr</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;&gt;">
+ <DisplayString>()</DisplayString>
+ </Type>
+ <Type Name="tuple$&lt;*&gt;">
+ <DisplayString>({__0})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*&gt;">
+ <DisplayString>({__0}, {__1})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ <Item Name="[5]">__5</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ <Item Name="[5]">__5</Item>
+ <Item Name="[6]">__6</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ <Item Name="[5]">__5</Item>
+ <Item Name="[6]">__6</Item>
+ <Item Name="[7]">__7</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ <Item Name="[5]">__5</Item>
+ <Item Name="[6]">__6</Item>
+ <Item Name="[7]">__7</Item>
+ <Item Name="[8]">__8</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8}, {__9})</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ <Item Name="[5]">__5</Item>
+ <Item Name="[6]">__6</Item>
+ <Item Name="[7]">__7</Item>
+ <Item Name="[8]">__8</Item>
+ <Item Name="[9]">__9</Item>
+ </Expand>
+ </Type>
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*,*,*,*&gt;">
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8}, {__9}, ...)</DisplayString>
+ <Expand>
+ <Item Name="[0]">__0</Item>
+ <Item Name="[1]">__1</Item>
+ <Item Name="[2]">__2</Item>
+ <Item Name="[3]">__3</Item>
+ <Item Name="[4]">__4</Item>
+ <Item Name="[5]">__5</Item>
+ <Item Name="[6]">__6</Item>
+ <Item Name="[7]">__7</Item>
+ <Item Name="[8]">__8</Item>
+ <Item Name="[9]">__9</Item>
+ <Synthetic Name="[...]"><DisplayString>...</DisplayString></Synthetic>
+ </Expand>
+ </Type>
+
+ <!-- Directly tagged enums. $T1 is the type name -->
+ <Type Name="enum$&lt;*&gt;">
+ <Intrinsic Name="tag" Expression="discriminant" />
+ <DisplayString Condition="tag() == 0">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 1" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 2" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 3" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 4" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 5" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 6" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 7" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 8" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 9" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 10" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 11" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 12" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 13" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 14" Optional="true">{tag(),en}</DisplayString>
+ <DisplayString Condition="tag() == 15" Optional="true">{tag(),en}</DisplayString>
+
+ <Expand>
+ <Synthetic Name="[variant]">
+ <DisplayString>{tag(),en}</DisplayString>
+ </Synthetic>
+ <ExpandedItem Condition="tag() == 0">variant0</ExpandedItem>
+ <ExpandedItem Condition="tag() == 1" Optional="true">variant1</ExpandedItem>
+ <ExpandedItem Condition="tag() == 2" Optional="true">variant2</ExpandedItem>
+ <ExpandedItem Condition="tag() == 3" Optional="true">variant3</ExpandedItem>
+ <ExpandedItem Condition="tag() == 4" Optional="true">variant4</ExpandedItem>
+ <ExpandedItem Condition="tag() == 5" Optional="true">variant5</ExpandedItem>
+ <ExpandedItem Condition="tag() == 6" Optional="true">variant6</ExpandedItem>
+ <ExpandedItem Condition="tag() == 7" Optional="true">variant7</ExpandedItem>
+ <ExpandedItem Condition="tag() == 8" Optional="true">variant8</ExpandedItem>
+ <ExpandedItem Condition="tag() == 9" Optional="true">variant9</ExpandedItem>
+ <ExpandedItem Condition="tag() == 10" Optional="true">variant10</ExpandedItem>
+ <ExpandedItem Condition="tag() == 11" Optional="true">variant11</ExpandedItem>
+ <ExpandedItem Condition="tag() == 12" Optional="true">variant12</ExpandedItem>
+ <ExpandedItem Condition="tag() == 13" Optional="true">variant13</ExpandedItem>
+ <ExpandedItem Condition="tag() == 14" Optional="true">variant14</ExpandedItem>
+ <ExpandedItem Condition="tag() == 15" Optional="true">variant15</ExpandedItem>
+ </Expand>
+ </Type>
+
+ <!-- Single variant enums. $T1 is the name of the enum, $T2 is the name of the variant -->
+ <Type Name="enum$&lt;*, *&gt;">
+ <DisplayString>{"$T2",sb}</DisplayString>
+ <Expand>
+ <Synthetic Name="[variant]">
+ <DisplayString>{"$T2",sb}</DisplayString>
+ </Synthetic>
+ <ExpandedItem>$T2</ExpandedItem>
+ </Expand>
+ </Type>
+
+ <!-- Niche-layout enums. $T1 is the name of the enum, $T2 is the low value of the dataful
+ variant tag, $T3 is the high value of the dataful variant tag, $T4 is the name of
+ the dataful variant -->
+ <Type Name="enum$&lt;*, *, *, *&gt;">
+ <Intrinsic Name="tag" Expression="discriminant" />
+ <Intrinsic Name="is_dataful" Expression="tag() &gt;= $T2 &amp;&amp; tag() &lt;= $T3" />
+ <DisplayString Condition="is_dataful()">{"$T4",sb}({dataful_variant})</DisplayString>
+ <DisplayString Condition="!is_dataful()">{discriminant,en}</DisplayString>
+ <Expand>
+ <ExpandedItem Condition="is_dataful()">dataful_variant</ExpandedItem>
+ <Synthetic Condition="is_dataful()" Name="[variant]">
+ <DisplayString>{"$T4",sb}</DisplayString>
+ </Synthetic>
+ <Synthetic Condition="!is_dataful()" Name="[variant]">
+ <DisplayString>{discriminant,en}</DisplayString>
+ </Synthetic>
+ </Expand>
+ </Type>
+</AutoVisualizer>