Skip to content

Instantly share code, notes, and snippets.

@Bak-Jin-Hyeong
Last active August 13, 2019 05:03
Show Gist options
  • Save Bak-Jin-Hyeong/d6f11c977aad24e5e8749d9e36da1cc8 to your computer and use it in GitHub Desktop.
Save Bak-Jin-Hyeong/d6f11c977aad24e5e8749d9e36da1cc8 to your computer and use it in GitHub Desktop.
visual studio 2015 debug visualizer for google abseil-cpp
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="absl::lts_2019_08_08::InlinedVector&lt;*&gt;">
<DisplayString>{{ size={storage_.metadata_.value >> 1} }}</DisplayString>
<Expand>
<Item Name="[N]" ExcludeView="simple">sizeof(storage_.data_.inlined.inlined_data) / sizeof(storage_.data_.inlined.inlined_data[0])</Item>
<Item Name="[allocator]" ExcludeView="simple">storage_.metadata_</Item>
<Item Name="[capacity]" ExcludeView="simple" Condition="(storage_.metadata_.value &amp; 1) == 0">$T2</Item>
<Item Name="[capacity]" ExcludeView="simple" Condition="(storage_.metadata_.value &amp; 1) == 1">storage_.data_.allocated.allocated_capacity</Item>
<IndexListItems Condition="(storage_.metadata_.value &amp; 1) == 0">
<Size>storage_.metadata_.value &gt;&gt; 1</Size>
<ValueNode>(($T1 &amp;)(storage_.data_.inlined.inlined_data[$i]))</ValueNode>
</IndexListItems>
<IndexListItems Condition="(storage_.metadata_.value &amp; 1) == 1">
<Size>storage_.metadata_.value &gt;&gt; 1</Size>
<ValueNode>storage_.data_.allocated.allocated_data[$i]</ValueNode>
</IndexListItems>
</Expand>
</Type>
</AutoVisualizer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment