MSVC: Fix List visualisation showing infinite nodes
This commit is contained in:
parent
88b6959cb4
commit
3482d9bacf
1 changed files with 9 additions and 11 deletions
|
@ -4,12 +4,6 @@
|
||||||
Debug visualizers for a few common ScummVM types for Visual Studio 2012 and up.
|
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.
|
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">
|
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||||
|
@ -74,11 +68,15 @@
|
||||||
<DisplayString Condition="&_anchor == _anchor._next">{{ empty }}</DisplayString>
|
<DisplayString Condition="&_anchor == _anchor._next">{{ empty }}</DisplayString>
|
||||||
<DisplayString Condition="&_anchor != _anchor._next">{{ non-empty }}</DisplayString>
|
<DisplayString Condition="&_anchor != _anchor._next">{{ non-empty }}</DisplayString>
|
||||||
<Expand>
|
<Expand>
|
||||||
<LinkedListItems Condition="&_anchor != _anchor._next">
|
<CustomListItems Condition="&_anchor != _anchor._next">
|
||||||
<HeadPointer>_anchor._next</HeadPointer>
|
<Variable Name="head" InitialValue="&_anchor"/>
|
||||||
<NextPointer>_next</NextPointer>
|
<Variable Name="iter" InitialValue="_anchor._next"/>
|
||||||
<ValueNode>((Common::ListInternal::Node<$T1>*)this)->_data</ValueNode>
|
<Loop>
|
||||||
</LinkedListItems>
|
<Break Condition="iter == head"/>
|
||||||
|
<Item>((Common::ListInternal::Node<$T1>*)iter)->_data</Item>
|
||||||
|
<Exec>iter = iter->_next</Exec>
|
||||||
|
</Loop>
|
||||||
|
</CustomListItems>
|
||||||
</Expand>
|
</Expand>
|
||||||
</Type>
|
</Type>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue