Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a visualizer for _Ref_count_obj_alloc3 and _Ref_count_obj2 #2811

Merged
merged 7 commits into from
Jun 25, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,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>
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a fixed string to a _Uses == 0 condition?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we need to show a child item for an empty shared_ptr? (weak_ptrs will display themselves as expired, IIRC)

</Expand>
</Type>

<!-- VC 2013 -->
<Type Name="std::_Ref_count_obj_alloc&lt;*&gt;" Priority="MediumLow">
<DisplayString>allocate_shared</DisplayString>
Expand All @@ -418,6 +426,20 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Expand>
</Type>

<!-- VS 2019 _Ref_count_obj_alloc3 16.7, _Ref_count_obj_alloc2 16.3 -->
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
<Type Name="std::_Ref_count_obj_alloc3&lt;*&gt;">
<AlternativeType Name="std::_Ref_count_obj_alloc2&lt;*&gt;" />
CaseyCarter marked this conversation as resolved.
Show resolved Hide resolved
<!-- 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