Skip to content

Commit

Permalink
add a visualizer for _Ref_count_obj_alloc3 and _Ref_count_obj2 (m…
Browse files Browse the repository at this point in the history
…icrosoft#2811)

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
  • Loading branch information
3 people committed Aug 13, 2022
1 parent 492bfcc commit f7be9df
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Expand>
</Type>

<!-- VS 2019 16.3 -->
<Type Name="std::_Ref_count_obj2&lt;*&gt;">
<DisplayString>make_shared</DisplayString>
<Expand>
<Item Condition="_Uses != 0" Name="[original ptr]">($T1 *) &amp;_Storage</Item>
</Expand>
</Type>

<!-- VC 2015 -->
<Type Name="std::_Ref_count_obj_alloc&lt;*&gt;">
<DisplayString>allocate_shared</DisplayString>
Expand All @@ -380,6 +388,21 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Expand>
</Type>

<!-- VS 2019 16.7: _Ref_count_obj_alloc3 -->
<!-- VS 2019 16.3: _Ref_count_obj_alloc2 -->
<Type Name="std::_Ref_count_obj_alloc3&lt;*&gt;">
<AlternativeType Name="std::_Ref_count_obj_alloc2&lt;*&gt;" />
<!-- stateless allocator -->
<Intrinsic Optional="true" Name="allocator" Expression="*((_Mybase *) this)"/>
<!-- stateful allocator -->
<Intrinsic Optional="true" Name="allocator" Expression="_Myval"/>
<DisplayString>allocate_shared</DisplayString>
<Expand>
<Item Condition="_Uses != 0" Name="[original ptr]">($T1 *) &amp;_Storage</Item>
<Item Name="[allocator]">allocator()</Item>
</Expand>
</Type>

<!-- VC 2017, second toolset update -->
<Type Name="std::_Ref_count_resource&lt;*&gt;">
<DisplayString>custom deleter</DisplayString>
Expand Down

0 comments on commit f7be9df

Please sign in to comment.