diff options
author | Jeremy Koritzinsky <jekoritz@microsoft.com> | 2021-05-20 02:43:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 02:43:37 +0300 |
commit | d49bcbe0441f5c954cddcbe28a222eb34917bcaf (patch) | |
tree | 355f6e22bb309aecf2f8cd54d378849b2704eda1 /src/coreclr/utilcode | |
parent | aad916c7111323d4b5744eb2444252d149c57a8a (diff) |
Add basic natvis visualizations for some VM types (#52853)
Diffstat (limited to 'src/coreclr/utilcode')
-rw-r--r-- | src/coreclr/utilcode/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/coreclr/utilcode/utilcode.natvis | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/coreclr/utilcode/CMakeLists.txt b/src/coreclr/utilcode/CMakeLists.txt index af1187a59b2..fec22cf9dce 100644 --- a/src/coreclr/utilcode/CMakeLists.txt +++ b/src/coreclr/utilcode/CMakeLists.txt @@ -112,6 +112,11 @@ endif(CLR_CMAKE_HOST_UNIX) if(CLR_CMAKE_HOST_WIN32) target_compile_definitions(utilcodestaticnohost PRIVATE _CRTIMP=) # use static version of crt + + link_natvis_sources_for_target(utilcodestaticnohost INTERFACE utilcode.natvis) + link_natvis_sources_for_target(utilcode_crossgen INTERFACE utilcode.natvis) + link_natvis_sources_for_target(utilcode_dac INTERFACE utilcode.natvis) + link_natvis_sources_for_target(utilcode INTERFACE utilcode.natvis) endif(CLR_CMAKE_HOST_WIN32) set_target_properties(utilcode_dac PROPERTIES DAC_COMPONENT TRUE) diff --git a/src/coreclr/utilcode/utilcode.natvis b/src/coreclr/utilcode/utilcode.natvis new file mode 100644 index 00000000000..7756270b164 --- /dev/null +++ b/src/coreclr/utilcode/utilcode.natvis @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- +Licensed to the .NET Foundation under one or more agreements. +The .NET Foundation licenses this file to you under the MIT license. +--> + + +<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> + <Type Name="SString"> + <DisplayString Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_EMPTY">[Empty]</DisplayString> + <DisplayString Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_UNICODE">[Unicode] {m_buffer,su}</DisplayString> + <DisplayString Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_ASCII">[ASCII] {m_buffer,s}</DisplayString> + <DisplayString Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_UTF8">[UTF8] {m_buffer,s8}</DisplayString> + <DisplayString Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_ANSI">[ANSI] {m_buffer,s}</DisplayString> + <StringView Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_UNICODE">m_buffer,su</StringView> + <StringView Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_ASCII">m_buffer,s</StringView> + <StringView Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_UTF8">m_buffer,s8</StringView> + <StringView Condition="(m_flags & REPRESENTATION_MASK) == REPRESENTATION_ANSI">m_buffer,s</StringView> + </Type> +</AutoVisualizer> |