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 1 commit
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
15 changes: 15 additions & 0 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Expand>
</Type>

<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 +425,14 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Expand>
</Type>

<Type Name="std::_Ref_count_obj_alloc3&lt;*&gt;">
<DisplayString>allocate_shared</DisplayString>
<Expand>
<Item Condition="_Uses != 0" Name="[original ptr]">($T1 *) &amp;_Storage</Item>
<Item Name="[allocator]">*((_Mybase *) this)</Item>
fsb4000 marked this conversation as resolved.
Show resolved Hide resolved
</Expand>
</Type>

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