Bitfield: Add .natvis for easier debugging in Visual Studio

This commit is contained in:
Scott Mansell 2015-10-30 12:30:22 +13:00
parent bd20dd3962
commit bfac1c73f0
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="BitField&lt;*,*,*&gt;">
<DisplayString Condition="$T2 == 1">{(storage &amp; (1 &lt;&lt; $T1)) != 0}</DisplayString>
<DisplayString>{(storage &gt;&gt; $T1) &amp; ((1 &lt;&lt; $T2) - 1)}</DisplayString>
<Expand>
<Item Name="Offset">$T1</Item>
<Item Name="Size">$T2</Item>
</Expand>
</Type>
</AutoVisualizer>

View File

@ -187,7 +187,10 @@
<Project>{41279555-f94f-4ebc-99de-af863c10c5c4}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Natvis Include="BitField.natvis" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -189,6 +189,8 @@
<ClInclude Include="GL\GLInterfaceBase.h">
<Filter>GL\GLInterface</Filter>
</ClInclude>
<ClInclude Include="Assert.h" />
<ClInclude Include="NonCopyable.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BreakPoints.cpp" />
@ -253,4 +255,7 @@
<ItemGroup>
<Text Include="CMakeLists.txt" />
</ItemGroup>
</Project>
<ItemGroup>
<Natvis Include="BitField.natvis" />
</ItemGroup>
</Project>