Create EnumMap natvis
This commit is contained in:
parent
b96297f2ee
commit
8e2b06906b
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2022 Dolphin Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="Common::EnumMap<*,*,*>">
|
||||
<Expand>
|
||||
<!-- The following would work, except ValueNode for IndexListItems doesn't support the Name attribute.
|
||||
It's only allowed for LinkedListItems and TreeItems, for some reason. So we get to reimplement it with CustomListItems. -->
|
||||
<!--
|
||||
<IndexListItems>
|
||||
<Size>$T2 + 1</Size>
|
||||
<ValueNode Name="[{($T3)$i}]">m_array[$i]</ValueNode>
|
||||
</IndexListItems>
|
||||
-->
|
||||
<CustomListItems MaxItemsPerView="5000">
|
||||
<Variable Name="i" InitialValue="0" />
|
||||
<!-- Size is incremented by 1 since the template argument is the last member (inclusive), but we want the count (exclusive) -->
|
||||
<Size>$T2 + 1</Size>
|
||||
<Loop>
|
||||
<Break Condition="i > $T2" />
|
||||
<Item Name="[{($T3)i}]">m_array[i]</Item>
|
||||
<Exec>i++</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
|
@ -1240,5 +1240,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="Common\BitField.natvis" />
|
||||
<Natvis Include="Common\EnumMap.natvis" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue