Build: expand Visual Studio natvis file
Expand the natvis file (which VS IDE debugger uses to visualize custom data types) to handle: - blender::Map with pointer keys - blender::Set with both regular and pointer keys Pull Request: https://projects.blender.org/blender/blender/pulls/138866
This commit is contained in:
committed by
Aras Pranckevicius
parent
fdfd1de9a8
commit
919d2693c0
@@ -37,6 +37,25 @@
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<!-- visualizer for Map with pointer keys (IntrusiveMapSlot slot type) -->
|
||||
<Type Name="blender::Map<*>" Priority="MediumLow">
|
||||
<DisplayString>Size={occupied_and_removed_slots_ - removed_slots_}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems MaxItemsPerView="5000">
|
||||
<Variable Name="slot" InitialValue="slots_.data_"/>
|
||||
<Variable Name="i" InitialValue="0"/>
|
||||
<Loop>
|
||||
<Break Condition="i >= occupied_and_removed_slots_ - removed_slots_"/>
|
||||
<If Condition="(uint64_t)slot->key_ < 0xfffffffffffffffe">
|
||||
<Item Name="{slot->key_}">slot->value_buffer_</Item>
|
||||
<Exec>++i</Exec>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<!-- visualizer for regular Map (SimpleMapSlot slot type) -->
|
||||
<Type Name="blender::Map<*>">
|
||||
<DisplayString>Size={occupied_and_removed_slots_ - removed_slots_}</DisplayString>
|
||||
<Expand>
|
||||
@@ -52,7 +71,47 @@
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<!-- visualizer for Set with pointer keys (IntrusiveSetSlot slot type) -->
|
||||
<Type Name="blender::Set<*>" Priority="MediumLow">
|
||||
<DisplayString>Size={occupied_and_removed_slots_ - removed_slots_}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems MaxItemsPerView="5000">
|
||||
<Variable Name="slot" InitialValue="slots_.data_"/>
|
||||
<Variable Name="i" InitialValue="0"/>
|
||||
<Loop>
|
||||
<Break Condition="i >= occupied_and_removed_slots_ - removed_slots_"/>
|
||||
<If Condition="(uint64_t)slot->key_ < 0xfffffffffffffffe">
|
||||
<Item Name="[{i}]">slot->key_</Item>
|
||||
<Exec>++i</Exec>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<!-- visualizer for regular Set (SimpleSetSlot slot type) -->
|
||||
<Type Name="blender::Set<*>">
|
||||
<DisplayString>Size={occupied_and_removed_slots_ - removed_slots_}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems>
|
||||
<Variable Name="slot" InitialValue="slots_.data_"/>
|
||||
<Variable Name="i" InitialValue="0"/>
|
||||
<Loop>
|
||||
<Break Condition="i >= occupied_and_removed_slots_ - removed_slots_"/>
|
||||
<If Condition="slot->state_ == 1">
|
||||
<Item Name="[{i}]">slot->key_buffer_</Item>
|
||||
<Exec>++i</Exec>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="blender::TypedBuffer<*,*>">
|
||||
<DisplayString>{*($T1*)buffer_.buffer_.buffer_}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*($T1*)buffer_.buffer_.buffer_,nd</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
||||
Reference in New Issue
Block a user