summaryrefslogtreecommitdiffstats
path: root/toolkit/library/gecko.natvis
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /toolkit/library/gecko.natvis
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/library/gecko.natvis')
-rw-r--r--toolkit/library/gecko.natvis151
1 files changed, 151 insertions, 0 deletions
diff --git a/toolkit/library/gecko.natvis b/toolkit/library/gecko.natvis
new file mode 100644
index 0000000000..dfd1da6b04
--- /dev/null
+++ b/toolkit/library/gecko.natvis
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
+
+ <!-- Mozilla Gecko Visualizers -->
+
+ <Type Name="mozilla::Maybe&lt;*&gt;">
+ <DisplayString Condition="mIsSome == false">Nothing</DisplayString>
+ <DisplayString Condition="mIsSome == true">Some({*($T1 *)&amp;mStorage.val})</DisplayString>
+ <Expand>
+ <ExpandedItem Condition="mIsSome == true">*($T1 *)&amp;mStorage.val</ExpandedItem>
+ </Expand>
+ </Type>
+
+ <Type Name="mozilla::Result&lt;*,*&gt;">
+ <DisplayString>{mImpl}</DisplayString>
+ </Type>
+
+ <Type Name="mozilla::detail::ResultImplementation&lt;*,*,mozilla::detail::PackingStrategy::Variant&gt;">
+ <DisplayString Condition="mStorage.tag == false">ok: {*($T1 *)(mStorage.rawData)}</DisplayString>
+ <DisplayString Condition="mStorage.tag == true">err: {*($T2 *)(mStorage.rawData)}</DisplayString>
+ <DisplayString>%% invalid storage tag in variant %%</DisplayString>
+ <Expand>
+ <ExpandedItem Condition="mStorage.tag == false">*($T1 *)(mStorage.rawData)</ExpandedItem>
+ <ExpandedItem Condition="mStorage.tag == true">*($T2 *)(mStorage.rawData)</ExpandedItem>
+ </Expand>
+ </Type>
+
+ <!-- nsTArray -->
+ <Type Name="nsTArray&lt;*&gt;">
+ <DisplayString Condition="mHdr-&gt;mLength == 0 &amp;&amp; mHdr-&gt;mCapacity == 0">empty</DisplayString>
+ <DisplayString Condition="mHdr-&gt;mLength == mHdr-&gt;mCapacity">size = {mHdr-&gt;mLength}</DisplayString>
+ <DisplayString>size = {mHdr-&gt;mLength}, capacity = {mHdr-&gt;mCapacity}</DisplayString>
+ <Expand>
+ <ArrayItems Condition="mHdr->mLength &gt; 0">
+ <Size>mHdr-&gt;mLength</Size>
+ <ValuePointer>($T1*)(mHdr + 1)</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Type>
+
+ <!-- refcounts -->
+ <Type Name="nsAutoRefCnt">
+ <DisplayString>{mValue}</DisplayString>
+ </Type>
+
+ <Type Name="nsCycleCollectingAutoRefCnt">
+ <!-- this value needs to be updated if NS_NUMBER_OF_FLAGS_IN_REFCNT in xpcom/glue/nsISupportsImpl.h changes -->
+ <DisplayString>{mValue >> 2}</DisplayString>
+ <Expand>
+ <Synthetic Name="In Purple Buffer"><DisplayString>{mValue &amp; 1 != 0}</DisplayString></Synthetic>
+ <Synthetic Name="Is Purple"><DisplayString>{mValue &amp; 2 != 0}</DisplayString></Synthetic>
+ </Expand>
+ </Type>
+
+ <Type Name="mozilla::ThreadSafeAutoRefCnt">
+ <DisplayString>{mValue.mValue._My_val}</DisplayString>
+ </Type>
+
+ <!-- smart pointer/refcount pointer things -->
+ <Type Name="nsRefPtr&lt;*&gt;">
+ <AlternativeType Name="nsCOMPtr&lt;*&gt;" />
+ <AlternativeType Name="nsAutoPtr&lt;*&gt;" />
+ <AlternativeType Name="mozilla::WebGLRefPtr&lt;*&gt;" />
+
+ <DisplayString Condition="mRawPtr == 0">NULL</DisplayString>
+ <DisplayString>{*($T1*)mRawPtr}</DisplayString>
+ <Expand>
+ <ExpandedItem>($T1*)mRawPtr</ExpandedItem>
+ </Expand>
+ </Type>
+
+ <!-- strings -->
+ <Type Name="nsTString&lt;char&gt;">
+ <AlternativeType Name="nsTLiteralString&lt;char&gt;" />
+ <AlternativeType Name="mozilla::detail::nsTStringRepr&lt;char&gt;" />
+ <AlternativeType Name="nsTSubstring&lt;char&gt;" />
+
+ <DisplayString>{mData,s}</DisplayString>
+ <StringView>mData,s</StringView>
+ <Expand>
+ <Item Name="Length">mLength</Item>
+ <Item Name="Flags">mDataFlags</Item>
+ </Expand>
+ </Type>
+
+ <Type Name="nsTSubstringTuple&lt;char&gt;">
+ <DisplayString Condition="mHead != nullptr">{mHead,na} {mFragB-&gt;mData,s}</DisplayString>
+ <DisplayString Condition="mHead == nullptr">{mFragA-&gt;mData,s} {mFragB-&gt;mData,s}</DisplayString>
+ </Type>
+
+ <Type Name="nsTString&lt;char16_t&gt;">
+ <AlternativeType Name="nsTLiteralString&lt;char16_t&gt;" />
+ <AlternativeType Name="mozilla::detail::nsTStringRepr&lt;char16_t&gt;" />
+ <AlternativeType Name="nsTSubstring&lt;char16_t&gt;" />
+
+ <DisplayString>{mData,su}</DisplayString>
+ <StringView>mData,su</StringView>
+ <Expand>
+ <Item Name="Length">mLength</Item>
+ <Item Name="Flags">mDataFlags</Item>
+ </Expand>
+ </Type>
+
+ <Type Name="nsTSubstringTuple&lt;char16_t&gt;">
+ <DisplayString Condition="mHead != nullptr">{mHead,na} {mFragB-&gt;mData,su}</DisplayString>
+ <DisplayString Condition="mHead == nullptr">{mFragA-&gt;mData,su} {mFragB-&gt;mData,su}</DisplayString>
+ </Type>
+
+ <!-- rects, points, etc. -->
+ <Type Name="mozilla::gfx::BaseRect&lt;*,*,*,*,*&gt;">
+ <AlternativeType Name="mozilla::gfx::Rect" />
+ <DisplayString>x={x}, y={y}, width={width}, height={height}</DisplayString>
+ </Type>
+
+ <Type Name="mozilla::gfx::BaseSize&lt;*,*&gt;">
+ <AlternativeType Name="mozilla::gfx::Size" />
+ <AlternativeType Name="nsIntSize" />
+ <DisplayString>width={width}, height={height}</DisplayString>
+ </Type>
+
+ <Type Name="mozilla::gfx::BasePoint&lt;*,*&gt;">
+ <AlternativeType Name="mozilla::gfx::Point" />
+ <DisplayString>x={x}, y={y}</DisplayString>
+ </Type>
+
+ <Type Name="mozilla::gfx::Matrix4x4">
+ <AlternativeType Name="gfx3DMatrix" />
+ <DisplayString Condition="(_11==_22==_33==_44==1) &amp;&amp; (_12==_13==_14==_21==_23==_24==_31==_32==_34==_41==_42==_43==0)">[Identity]</DisplayString>
+ <DisplayString Condition="(_11==_22==_33==_44==1) &amp;&amp; (_12==_13==_14==_21==_23==_24==_31==_32==_34==0)">[Translate: ({_41}, {_42}, {_43})]</DisplayString>
+ <DisplayString Condition="_44==1 &amp;&amp; (_12==_13==_14==_21==_23==_24==_31==_32==_34==_41==_42==_43==0)">[Scale: ({_11}, {_22}, {_33})]</DisplayString>
+ <DisplayString>[4x4 Matrix]</DisplayString>
+
+ <Expand>
+ <Synthetic Name="R1"><DisplayString>[{_11}, {_12}, {_13}, {_14}]</DisplayString></Synthetic>
+ <Synthetic Name="R2"><DisplayString>[{_21}, {_22}, {_23}, {_24}]</DisplayString></Synthetic>
+ <Synthetic Name="R3"><DisplayString>[{_31}, {_32}, {_33}, {_34}]</DisplayString></Synthetic>
+ <Synthetic Name="R4"><DisplayString>[{_41}, {_42}, {_43}, {_44}]</DisplayString></Synthetic>
+ </Expand>
+ </Type>
+
+ <!-- JS types -->
+ <Type Name="JS::Handle&lt;*&gt;">
+ <DisplayString Condition="ptr == 0">NULL</DisplayString>
+ <DisplayString>{*($T1*)ptr}</DisplayString>
+ <Expand>
+ <ExpandedItem>($T1*)ptr</ExpandedItem>
+ </Expand>
+ </Type>
+
+
+</AutoVisualizer>