Backed out changeset bcbab342eed8 (bug 1889658) for causing wpt reftest failures...
[gecko.git] / toolkit / library / gecko.natvis
blobdfd1da6b04a8e2710378f7fbce07c5dfad8697de
1 <?xml version="1.0" encoding="utf-8"?>
2 <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
4 <!-- Mozilla Gecko Visualizers -->
6 <Type Name="mozilla::Maybe&lt;*&gt;">
7 <DisplayString Condition="mIsSome == false">Nothing</DisplayString>
8 <DisplayString Condition="mIsSome == true">Some({*($T1 *)&amp;mStorage.val})</DisplayString>
9 <Expand>
10 <ExpandedItem Condition="mIsSome == true">*($T1 *)&amp;mStorage.val</ExpandedItem>
11 </Expand>
12 </Type>
14 <Type Name="mozilla::Result&lt;*,*&gt;">
15 <DisplayString>{mImpl}</DisplayString>
16 </Type>
18 <Type Name="mozilla::detail::ResultImplementation&lt;*,*,mozilla::detail::PackingStrategy::Variant&gt;">
19 <DisplayString Condition="mStorage.tag == false">ok: {*($T1 *)(mStorage.rawData)}</DisplayString>
20 <DisplayString Condition="mStorage.tag == true">err: {*($T2 *)(mStorage.rawData)}</DisplayString>
21 <DisplayString>%% invalid storage tag in variant %%</DisplayString>
22 <Expand>
23 <ExpandedItem Condition="mStorage.tag == false">*($T1 *)(mStorage.rawData)</ExpandedItem>
24 <ExpandedItem Condition="mStorage.tag == true">*($T2 *)(mStorage.rawData)</ExpandedItem>
25 </Expand>
26 </Type>
28 <!-- nsTArray -->
29 <Type Name="nsTArray&lt;*&gt;">
30 <DisplayString Condition="mHdr-&gt;mLength == 0 &amp;&amp; mHdr-&gt;mCapacity == 0">empty</DisplayString>
31 <DisplayString Condition="mHdr-&gt;mLength == mHdr-&gt;mCapacity">size = {mHdr-&gt;mLength}</DisplayString>
32 <DisplayString>size = {mHdr-&gt;mLength}, capacity = {mHdr-&gt;mCapacity}</DisplayString>
33 <Expand>
34 <ArrayItems Condition="mHdr->mLength &gt; 0">
35 <Size>mHdr-&gt;mLength</Size>
36 <ValuePointer>($T1*)(mHdr + 1)</ValuePointer>
37 </ArrayItems>
38 </Expand>
39 </Type>
41 <!-- refcounts -->
42 <Type Name="nsAutoRefCnt">
43 <DisplayString>{mValue}</DisplayString>
44 </Type>
46 <Type Name="nsCycleCollectingAutoRefCnt">
47 <!-- this value needs to be updated if NS_NUMBER_OF_FLAGS_IN_REFCNT in xpcom/glue/nsISupportsImpl.h changes -->
48 <DisplayString>{mValue >> 2}</DisplayString>
49 <Expand>
50 <Synthetic Name="In Purple Buffer"><DisplayString>{mValue &amp; 1 != 0}</DisplayString></Synthetic>
51 <Synthetic Name="Is Purple"><DisplayString>{mValue &amp; 2 != 0}</DisplayString></Synthetic>
52 </Expand>
53 </Type>
55 <Type Name="mozilla::ThreadSafeAutoRefCnt">
56 <DisplayString>{mValue.mValue._My_val}</DisplayString>
57 </Type>
59 <!-- smart pointer/refcount pointer things -->
60 <Type Name="nsRefPtr&lt;*&gt;">
61 <AlternativeType Name="nsCOMPtr&lt;*&gt;" />
62 <AlternativeType Name="nsAutoPtr&lt;*&gt;" />
63 <AlternativeType Name="mozilla::WebGLRefPtr&lt;*&gt;" />
65 <DisplayString Condition="mRawPtr == 0">NULL</DisplayString>
66 <DisplayString>{*($T1*)mRawPtr}</DisplayString>
67 <Expand>
68 <ExpandedItem>($T1*)mRawPtr</ExpandedItem>
69 </Expand>
70 </Type>
72 <!-- strings -->
73 <Type Name="nsTString&lt;char&gt;">
74 <AlternativeType Name="nsTLiteralString&lt;char&gt;" />
75 <AlternativeType Name="mozilla::detail::nsTStringRepr&lt;char&gt;" />
76 <AlternativeType Name="nsTSubstring&lt;char&gt;" />
78 <DisplayString>{mData,s}</DisplayString>
79 <StringView>mData,s</StringView>
80 <Expand>
81 <Item Name="Length">mLength</Item>
82 <Item Name="Flags">mDataFlags</Item>
83 </Expand>
84 </Type>
86 <Type Name="nsTSubstringTuple&lt;char&gt;">
87 <DisplayString Condition="mHead != nullptr">{mHead,na} {mFragB-&gt;mData,s}</DisplayString>
88 <DisplayString Condition="mHead == nullptr">{mFragA-&gt;mData,s} {mFragB-&gt;mData,s}</DisplayString>
89 </Type>
91 <Type Name="nsTString&lt;char16_t&gt;">
92 <AlternativeType Name="nsTLiteralString&lt;char16_t&gt;" />
93 <AlternativeType Name="mozilla::detail::nsTStringRepr&lt;char16_t&gt;" />
94 <AlternativeType Name="nsTSubstring&lt;char16_t&gt;" />
96 <DisplayString>{mData,su}</DisplayString>
97 <StringView>mData,su</StringView>
98 <Expand>
99 <Item Name="Length">mLength</Item>
100 <Item Name="Flags">mDataFlags</Item>
101 </Expand>
102 </Type>
104 <Type Name="nsTSubstringTuple&lt;char16_t&gt;">
105 <DisplayString Condition="mHead != nullptr">{mHead,na} {mFragB-&gt;mData,su}</DisplayString>
106 <DisplayString Condition="mHead == nullptr">{mFragA-&gt;mData,su} {mFragB-&gt;mData,su}</DisplayString>
107 </Type>
109 <!-- rects, points, etc. -->
110 <Type Name="mozilla::gfx::BaseRect&lt;*,*,*,*,*&gt;">
111 <AlternativeType Name="mozilla::gfx::Rect" />
112 <DisplayString>x={x}, y={y}, width={width}, height={height}</DisplayString>
113 </Type>
115 <Type Name="mozilla::gfx::BaseSize&lt;*,*&gt;">
116 <AlternativeType Name="mozilla::gfx::Size" />
117 <AlternativeType Name="nsIntSize" />
118 <DisplayString>width={width}, height={height}</DisplayString>
119 </Type>
121 <Type Name="mozilla::gfx::BasePoint&lt;*,*&gt;">
122 <AlternativeType Name="mozilla::gfx::Point" />
123 <DisplayString>x={x}, y={y}</DisplayString>
124 </Type>
126 <Type Name="mozilla::gfx::Matrix4x4">
127 <AlternativeType Name="gfx3DMatrix" />
128 <DisplayString Condition="(_11==_22==_33==_44==1) &amp;&amp; (_12==_13==_14==_21==_23==_24==_31==_32==_34==_41==_42==_43==0)">[Identity]</DisplayString>
129 <DisplayString Condition="(_11==_22==_33==_44==1) &amp;&amp; (_12==_13==_14==_21==_23==_24==_31==_32==_34==0)">[Translate: ({_41}, {_42}, {_43})]</DisplayString>
130 <DisplayString Condition="_44==1 &amp;&amp; (_12==_13==_14==_21==_23==_24==_31==_32==_34==_41==_42==_43==0)">[Scale: ({_11}, {_22}, {_33})]</DisplayString>
131 <DisplayString>[4x4 Matrix]</DisplayString>
133 <Expand>
134 <Synthetic Name="R1"><DisplayString>[{_11}, {_12}, {_13}, {_14}]</DisplayString></Synthetic>
135 <Synthetic Name="R2"><DisplayString>[{_21}, {_22}, {_23}, {_24}]</DisplayString></Synthetic>
136 <Synthetic Name="R3"><DisplayString>[{_31}, {_32}, {_33}, {_34}]</DisplayString></Synthetic>
137 <Synthetic Name="R4"><DisplayString>[{_41}, {_42}, {_43}, {_44}]</DisplayString></Synthetic>
138 </Expand>
139 </Type>
141 <!-- JS types -->
142 <Type Name="JS::Handle&lt;*&gt;">
143 <DisplayString Condition="ptr == 0">NULL</DisplayString>
144 <DisplayString>{*($T1*)ptr}</DisplayString>
145 <Expand>
146 <ExpandedItem>($T1*)ptr</ExpandedItem>
147 </Expand>
148 </Type>
151 </AutoVisualizer>