STL.natvis contains visualizers for _Ref_count_obj and _Ref_count_obj_alloc:
|
<Type Name="std::_Ref_count_obj<*>"> |
|
<DisplayString>make_shared</DisplayString> |
|
<Expand> |
|
<Item Condition="_Uses != 0" Name="[original ptr]">($T1 *) &_Storage</Item> |
|
</Expand> |
|
</Type> |
|
<!-- VC 2015 --> |
|
<Type Name="std::_Ref_count_obj_alloc<*>"> |
|
<DisplayString>allocate_shared</DisplayString> |
|
<Expand> |
|
<Item Condition="_Uses != 0" Name="[original ptr]">($T1 *) &_Mypair._Myval2</Item> |
|
<Item Name="[allocator]">_Mypair</Item> |
|
</Expand> |
|
</Type> |
However, we've upgraded those control blocks (which is possible while preserving binary compatibility because
shared_ptr performs type erasure). The modern forms are
_Ref_count_obj2 and
_Ref_count_obj_alloc3, which we don't have visualizers for:
|
template <class _Ty>
|
|
class _Ref_count_obj2 : public _Ref_count_base { // handle reference counting for object in control block, no allocator
|
|
template <class _Ty, class _Alloc>
|
|
class _Ref_count_obj_alloc3 : public _Ebco_base<_Rebind_alloc_t<_Alloc, _Ty>>, public _Ref_count_base {
|
Thus, while we intended for
make_shared and
allocate_shared to be visualized in cool ways, this has been broken for a while.
STL.natvis contains visualizers for
_Ref_count_objand_Ref_count_obj_alloc:STL/stl/debugger/STL.natvis
Lines 396 to 401 in 9947dd9
STL/stl/debugger/STL.natvis
Lines 412 to 419 in 9947dd9
However, we've upgraded those control blocks (which is possible while preserving binary compatibility because
shared_ptrperforms type erasure). The modern forms are_Ref_count_obj2and_Ref_count_obj_alloc3, which we don't have visualizers for:STL/stl/inc/memory
Lines 2018 to 2019 in 9947dd9
STL/stl/inc/memory
Lines 2438 to 2439 in 9947dd9
Thus, while we intended for
make_sharedandallocate_sharedto be visualized in cool ways, this has been broken for a while.