aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project/scripts
diff options
context:
space:
mode:
authorSupSuper2018-12-18 05:25:08 +0000
committerFilippos Karapetis2018-12-23 18:39:06 +0200
commit3482d9bacfea8242868c4486caad3d080af6cb1e (patch)
treea37796a3da782e0d3495460b87d721b9d5e71537 /devtools/create_project/scripts
parent88b6959cb4a2114771d22b546f43cbdbae8f2419 (diff)
downloadscummvm-rg350-3482d9bacfea8242868c4486caad3d080af6cb1e.tar.gz
scummvm-rg350-3482d9bacfea8242868c4486caad3d080af6cb1e.tar.bz2
scummvm-rg350-3482d9bacfea8242868c4486caad3d080af6cb1e.zip
MSVC: Fix List visualisation showing infinite nodes
Diffstat (limited to 'devtools/create_project/scripts')
-rw-r--r--devtools/create_project/scripts/scummvm.natvis20
1 files changed, 9 insertions, 11 deletions
diff --git a/devtools/create_project/scripts/scummvm.natvis b/devtools/create_project/scripts/scummvm.natvis
index e305bea74a..855ab286fd 100644
--- a/devtools/create_project/scripts/scummvm.natvis
+++ b/devtools/create_project/scripts/scummvm.natvis
@@ -4,12 +4,6 @@
Debug visualizers for a few common ScummVM types for Visual Studio 2012 and up.
To use, copy this file into Documents\Visual Studio 20xx\Visualizers.
-
- Known issues:
-
- * Lists appear to be infinite (the same elements repeat over and over again).
- Unfortunately, Lists don't store length information, and it's not possible to
- detect whether a Node is the last one by the Node itself.
-->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
@@ -74,11 +68,15 @@
<DisplayString Condition="&amp;_anchor == _anchor._next">{{ empty }}</DisplayString>
<DisplayString Condition="&amp;_anchor != _anchor._next">{{ non-empty }}</DisplayString>
<Expand>
- <LinkedListItems Condition="&amp;_anchor != _anchor._next">
- <HeadPointer>_anchor._next</HeadPointer>
- <NextPointer>_next</NextPointer>
- <ValueNode>((Common::ListInternal::Node&lt;$T1&gt;*)this)->_data</ValueNode>
- </LinkedListItems>
+ <CustomListItems Condition="&amp;_anchor != _anchor._next">
+ <Variable Name="head" InitialValue="&amp;_anchor"/>
+ <Variable Name="iter" InitialValue="_anchor._next"/>
+ <Loop>
+ <Break Condition="iter == head"/>
+ <Item>((Common::ListInternal::Node&lt;$T1&gt;*)iter)->_data</Item>
+ <Exec>iter = iter->_next</Exec>
+ </Loop>
+ </CustomListItems>
</Expand>
</Type>