mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
MSVC: Fix List visualisation showing infinite nodes
This commit is contained in:
parent
88b6959cb4
commit
3482d9bacf
@ -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="&_anchor == _anchor._next">{{ empty }}</DisplayString>
|
||||
<DisplayString Condition="&_anchor != _anchor._next">{{ non-empty }}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems Condition="&_anchor != _anchor._next">
|
||||
<HeadPointer>_anchor._next</HeadPointer>
|
||||
<NextPointer>_next</NextPointer>
|
||||
<ValueNode>((Common::ListInternal::Node<$T1>*)this)->_data</ValueNode>
|
||||
</LinkedListItems>
|
||||
<CustomListItems Condition="&_anchor != _anchor._next">
|
||||
<Variable Name="head" InitialValue="&_anchor"/>
|
||||
<Variable Name="iter" InitialValue="_anchor._next"/>
|
||||
<Loop>
|
||||
<Break Condition="iter == head"/>
|
||||
<Item>((Common::ListInternal::Node<$T1>*)iter)->_data</Item>
|
||||
<Exec>iter = iter->_next</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user