summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-03 09:42:44 -0400
committerYong He <yonghe@outlook.com>2017-11-03 09:42:44 -0400
commit8fe947b2fbbdaa747fb7acc7624d9290bba52086 (patch)
treeb5a554eac14202de2e0da12f3146fc0dc867faab /source
parentec41631032b65973e8f92348e0a86bb9924ef981 (diff)
Update natvis file for better viewing of RefPtr, DeclRef and Name classes
Diffstat (limited to 'source')
-rw-r--r--source/core/core.natvis2
-rw-r--r--source/slang/slang.natvis27
2 files changed, 27 insertions, 2 deletions
diff --git a/source/core/core.natvis b/source/core/core.natvis
index 3d9ac702e..91fdbb49b 100644
--- a/source/core/core.natvis
+++ b/source/core/core.natvis
@@ -54,7 +54,7 @@
</Expand>
</Type>
-<Type Name="Slang::RefPtrImpl&lt;*,*,*&gt;">
+<Type Name="Slang::RefPtr&lt;*&gt;">
<SmartPointer Usage="Minimal">pointer</SmartPointer>
<DisplayString Condition="pointer == 0">empty</DisplayString>
<DisplayString Condition="pointer != 0">RefPtr {*pointer}</DisplayString>
diff --git a/source/slang/slang.natvis b/source/slang/slang.natvis
index 7a7f7fe0e..7e6fd3753 100644
--- a/source/slang/slang.natvis
+++ b/source/slang/slang.natvis
@@ -9,5 +9,30 @@
<ExpandedItem>rawVal ? ($T1*)((char*)this + rawVal) : ($T1*)0</ExpandedItem>
</Expand>
</Type>
-
+ <Type Name="Slang::DeclRef&lt;*&gt;">
+ <SmartPointer Usage="Minimal">decl ? ($T1*)(decl) : ($T1*)0</SmartPointer>
+ <DisplayString Condition="decl == 0">DeclRef nullptr</DisplayString>
+ <DisplayString Condition="decl != 0">DeclRef {(*(*(Slang::DeclRefBase*)this).decl).nameAndLoc}</DisplayString>
+ <Expand>
+ <ExpandedItem>decl ? ($T1*)(decl) : ($T1*)0</ExpandedItem>
+ <Item Name="[Substitutions]:">"========================="</Item>
+ <LinkedListItems>
+ <HeadPointer>substitutions.pointer</HeadPointer>
+ <NextPointer>outer.pointer</NextPointer>
+ <ValueNode>this</ValueNode>
+ </LinkedListItems>
+ </Expand>
+ </Type>
+ <Type Name="Slang::DeclRefType">
+ <DisplayString>DeclRefType {declRef}</DisplayString>
+ <Expand>
+ <ExpandedItem>declRef</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="Slang::Name">
+ <DisplayString>{{name={(char*)(text.buffer.pointer+1), s}}}</DisplayString>
+ </Type>
+ <Type Name="Slang::NameLoc">
+ <DisplayString>{{name={(char*)((*name).text.buffer.pointer+1), s} loc={loc.raw}}}</DisplayString>
+ </Type>
</AutoVisualizer> \ No newline at end of file