Fix natvis for wistd types (#315)
* Fix natvis for wistd types * Link in the natvis by default * Satisfy Visual Studio's expected syntax
This commit is contained in:
Родитель
9bf782d0d2
Коммит
533e329663
|
@ -8,46 +8,102 @@
|
|||
PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
-->
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="wistd::_Func_impl<*>">
|
||||
<DisplayString>{_Callee._Object}</DisplayString>
|
||||
<Type Name="wistd::default_delete<*>">
|
||||
<DisplayString>default_delete</DisplayString>
|
||||
<Expand />
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::__compressed_pair_elem<*,*,0>">
|
||||
<Intrinsic Name="get" Expression="__value_" />
|
||||
<DisplayString>{get()}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>get()</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::__compressed_pair_elem<*,*,1>">
|
||||
<Intrinsic Name="get" Expression="*($T1*)this" />
|
||||
<DisplayString>{get()}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>get()</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::__compressed_pair<*>">
|
||||
<Intrinsic Name="first" Expression="(static_cast<_Base1*>(this))->get()" />
|
||||
<Intrinsic Name="second" Expression="(static_cast<_Base2*>(this))->get()" />
|
||||
<DisplayString>({first()}, {second()})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[first]">first()</Item>
|
||||
<Item Name="[second]">second()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::__function::__func<*>">
|
||||
<DisplayString>{__f_}</DisplayString>
|
||||
<Expand>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::function<*>">
|
||||
<DisplayString Condition="_Impl == 0">empty</DisplayString>
|
||||
<DisplayString Condition="_Impl != 0">{*_Impl}</DisplayString>
|
||||
<DisplayString Condition="__f_ == 0">empty</DisplayString>
|
||||
<DisplayString Condition="__f_ != 0">{*__f_}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="_Impl != 0">*_Impl</ExpandedItem>
|
||||
<ExpandedItem Condition="__f_ != 0">*__f_</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::unique_ptr<*>">
|
||||
<DisplayString Condition="_Myptr == 0">empty</DisplayString>
|
||||
<DisplayString Condition="_Myptr != 0">{*_Myptr}</DisplayString>
|
||||
<StringView>_Myptr</StringView>
|
||||
<SmartPointer Usage="Minimal">__ptr_.first()</SmartPointer>
|
||||
<DisplayString Condition="__ptr_.first() == 0">empty</DisplayString>
|
||||
<DisplayString Condition="__ptr_.first() != 0">{*__ptr_.first()}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[pointer]" Condition="_Myptr != 0">_Myptr</Item>
|
||||
<Item Name="[ptr]" Condition="__ptr_.first() != 0">__ptr_.first()</Item>
|
||||
<Item Name="[deleter]" Condition="__ptr_.first() != 0">__ptr_.second()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::unique_ptr<wchar_t[],*>">
|
||||
<DisplayString Condition="__ptr_.first() == 0">empty</DisplayString>
|
||||
<DisplayString Condition="__ptr_.first() != 0">{__ptr_.first(),su}</DisplayString>
|
||||
<StringView>__ptr_.first()</StringView>
|
||||
<Expand>
|
||||
<Item Name="[ptr]" Condition="__ptr_.first() != 0">__ptr_.first()</Item>
|
||||
<Item Name="[length]" Condition="__ptr_.first() != 0">wcslen(__ptr_.first())</Item>
|
||||
<Item Name="[deleter]" Condition="__ptr_.first() != 0">__ptr_.second()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::unique_ptr<wchar_t[*],*>">
|
||||
<DisplayString Condition="_Myptr == 0">empty</DisplayString>
|
||||
<DisplayString Condition="_Myptr != 0">{_Myptr,su}</DisplayString>
|
||||
<StringView>_Myptr</StringView>
|
||||
<DisplayString Condition="__ptr_.first() == 0">empty</DisplayString>
|
||||
<DisplayString Condition="__ptr_.first() != 0">{__ptr_.first(),su}</DisplayString>
|
||||
<StringView>__ptr_.first()</StringView>
|
||||
<Expand>
|
||||
<Item Name="[pointer]" Condition="_Myptr != 0">_Myptr</Item>
|
||||
<Item Name="[length]" Condition="_Myptr != 0">wcslen(_Myptr)</Item>
|
||||
<Item Name="[ptr]" Condition="__ptr_.first() != 0">__ptr_.first()</Item>
|
||||
<Item Name="[length]" Condition="__ptr_.first() != 0">wcslen(__ptr_.first())</Item>
|
||||
<Item Name="[deleter]" Condition="__ptr_.first() != 0">__ptr_.second()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::unique_ptr<char[],*>">
|
||||
<DisplayString Condition="__ptr_.first() == 0">empty</DisplayString>
|
||||
<DisplayString Condition="__ptr_.first() != 0">{__ptr_.first(),s}</DisplayString>
|
||||
<StringView>__ptr_.first()</StringView>
|
||||
<Expand>
|
||||
<Item Name="[ptr]" Condition="__ptr_.first() != 0">__ptr_.first()</Item>
|
||||
<Item Name="[length]" Condition="__ptr_.first() != 0">strlen(__ptr_.first())</Item>
|
||||
<Item Name="[deleter]" Condition="__ptr_.first() != 0">__ptr_.second()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="wistd::unique_ptr<char[*],*>">
|
||||
<DisplayString Condition="_Myptr == 0">empty</DisplayString>
|
||||
<DisplayString Condition="_Myptr != 0">{_Myptr,s}</DisplayString>
|
||||
<StringView>_Myptr</StringView>
|
||||
<DisplayString Condition="__ptr_.first() == 0">empty</DisplayString>
|
||||
<DisplayString Condition="__ptr_.first() != 0">{__ptr_.first(),s}</DisplayString>
|
||||
<StringView>__ptr_.first()</StringView>
|
||||
<Expand>
|
||||
<Item Name="[pointer]" Condition="_Myptr != 0">_Myptr</Item>
|
||||
<Item Name="[length]" Condition="_Myptr != 0">strlen(_Myptr)</Item>
|
||||
<Item Name="[ptr]" Condition="__ptr_.first() != 0">__ptr_.first()</Item>
|
||||
<Item Name="[length]" Condition="__ptr_.first() != 0">strlen(__ptr_.first())</Item>
|
||||
<Item Name="[deleter]" Condition="__ptr_.first() != 0">__ptr_.second()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
|
|
@ -62,6 +62,8 @@ set(COMMON_SOURCES
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/../natvis/wil.natvis
|
||||
)
|
||||
|
||||
add_link_options(/NATVIS:${CMAKE_SOURCE_DIR}/natvis/wil.natvis)
|
||||
|
||||
add_subdirectory(app)
|
||||
add_subdirectory(cpplatest)
|
||||
add_subdirectory(noexcept)
|
||||
|
|
Загрузка…
Ссылка в новой задаче