Skip to content

Commit

Permalink
Merge pull request #36 from ben-craig-cs/bcraig/list_visualizer
Browse files Browse the repository at this point in the history
Add List natvis
  • Loading branch information
jxy-s authored Dec 14, 2024
2 parents 933a601 + 4079876 commit da9ddc1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions radiant/Rad.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,22 @@ limitations under the License.
</Expand>
</Type>

<!-- rad::List -->
<Type Name="rad::List&lt;*&gt;">
<DisplayString Condition="m_storage.m_second.m_head.m_next == &amp;m_storage.m_second.m_head">empty</DisplayString>
<DisplayString Condition="m_storage.m_second.m_head.m_next != &amp;m_storage.m_second.m_head">non-empty</DisplayString>
<Expand>
<Item Name="[allocator]" ExcludeView="simple">m_storage</Item>
<CustomListItems MaxItemsPerView="5000" ExcludeView="Test">
<Variable Name="Head" InitialValue="&amp;m_storage.m_second.m_head" />
<Variable Name="Cur" InitialValue="m_storage.m_second.m_head.m_next" />
<Loop>
<Break Condition="Cur == Head" />
<Item>(*(rad::detail::ListNode&lt;$T1&gt;*)Cur).m_elt</Item>
<Exec>Cur = Cur-&gt;m_next</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>

</AutoVisualizer>

0 comments on commit da9ddc1

Please sign in to comment.